Forum Moderators: not2easy

Message Too Old, No Replies

CSS div:hover

Works in NS not in IE

         

dross

10:53 pm on Sep 11, 2003 (gmt 0)

10+ Year Member



Hi, I'm trying to use div:hover in my site. It works fine in NS but not in IE. Is there a work around for this?

example: div:hover.Category {background-color: rgb(100%,100%,70%);}

Thanks
David

SethCall

11:09 pm on Sep 11, 2003 (gmt 0)

10+ Year Member



its not going to work in IE, at all.

IE only supports :hover on the <a href="blahblah"></a> tag.

So you have oneof two options:

one is javascript,
the other is to make <a href> have a style of
display:block and treat it like a div.

If I remember correctly, that can do the trick. It's just so ugly to do though.

I personally recommend the javascript, as its very easy to do.

tedster

5:24 am on Sep 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just a note on syntax. When you combine a pseudo-class (:hover) with a class (.Category) then the class goes first -- div.Category:hover