Forum Moderators: not2easy

Message Too Old, No Replies

Hover classes and IE behavior files

Works in everything BUT IE...grrr

         

nightva

5:08 am on Aug 2, 2004 (gmt 0)

10+ Year Member



The problem I'm having is that I'm using nested lists to create a CSS driven drop down menu widget. Since every browser but IE already understands that the hover psudeo class can apply to any element, my menu does not work in IE.

I really want my CSS to validate so I don't want to use the IE proprietary behavior rule in my CSS. I've heard I can quarantine the behavior in a seperate sheet and then import it in.

That's the first part of the problem, as far as how this works. I already know how to write the import rule, I need to know how to write the quarantine file.

Thanks for any help!
Nathan

[edited by: SuzyUK at 8:39 am (utc) on Aug. 2, 2004]
[edit reason] ooops sorry no URLS see TOS #13 [webmasterworld.com] [/edit]

SuzyUK

8:56 am on Aug 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi nightva - Welcome to WebmasterWorld!

the "quarantine" file... are you meaning the actual IE behaviour file that makes the hovers work?

If so you don't need to write it (unless you want ot of course ;)) whatever:hover [xs4all.nl] is a short behaviour file just for hovers.

There is a larger behaviour file project which "forces" IE into more CSS compliancy - Dean Edwards - IE7 [dean.edwards.name]

If you are going to use one, I would recommend putting it inside an IE conditional to keep it "quarantined".
note: These behaviour files both need a browsers javascript enabled to work.

If that's not it and it's just a question of how to "seperate" it from your main CSS is this what you mean?

<!--[if lt IE 7]>
<style type="text/css" media="screen">
@import "ieonly.css";
</style>
<![endif]-->

then put the call to the behaviour file, (and any other IE specific CSS) in ieonly.css?

Suzy

nightva

4:58 am on Aug 3, 2004 (gmt 0)

10+ Year Member



Well the behavior file is called by the imported CSS.

Basically I have a advanced style sheet and a second sheet with the single rule:
body {behavior: url("csshover.htc");}

That CSS rule calls the htc file and then is imported into the main page. At least that's the idea. But it doesen't work.

I just want my page to use the behavior rule but still get validated as good CSS. In order to do that a 'middle man' sheet is needed using the import syntax.

Does that make sense?
Nathan