PDA

View Full Version : css-driven menus using whatever:hover


rmca
06-01-2004, 10:13 AM
hello

im very excited about your whatever:hover script http://www.xs4all.nl/~peterned/csshover.html, but im wondering if there is a way to make the css valid (according to eric meyer in "more eric meyer on css" the behavior spec isnt valid css)

instead of feeding ie through the behavior spec in the css file (that doesnt compute in other browsers), how about adding a conditional comment in the html file?

im not sure what it would look like (as im no expert) but how about <!-- [if ie]> @import url("csshover.htc") <![endif] -->?
or maybe it needs to be some form of <!-- [if ie]> <script type="text/jscript" src="csshover.htc"></script> <![endif] -->?

thank you very much
rasmus
rasmus@samtaleterapi.com
www.samtaleterapi.com

mindlessLemming
06-01-2004, 12:18 PM
im very excited about your whatever:hover script
Huh?

You could use conditional comments to feed the invalid CSS to IE only, though you may still need to embed it within a CSS file, rather than merely linking the .htc
:)

brothercake
06-01-2004, 01:21 PM
Note that conditional comments will cause a parsing exception on pages in XHTML mode.

mindlessLemming
06-01-2004, 02:29 PM
will cause a parsing exception on pages in XHTML mode.
Could you be a little more descriptive, please :)
Do you mean that XHTML being served as XML (application/xhtml+xml) will chuck a spaz if you use conditional comments?