triskellian: (cartoon me ibook)
triskellian ([personal profile] triskellian) wrote2004-07-07 07:39 pm
Entry tags:

Further adventures in CSS

I'm working on streamlining the CSS I was talking about in my previous post - some of it's clearly redundant, and there's no apparent reason for the third level to require a separate class from the first and second. But it's not working.

The problem is that the third level items are displaying when the first level is moused over, not when the second level is moused over. The reason for this seems to be that the first of these two bits of CSS is overruling the second:

li:hover ul { display: block;}
li ul li ul { display: none;}

This is the order they appear in in the stylesheet, which should make the second take precendence, but I guess 'li' includes 'li:hover'.

The best I can come up with is that I need a 'no-hover' pseudo class for the second li in the second bit, but such a thing does not seem to exist ;-(

Anyone got any ideas?

[identity profile] onebyone.livejournal.com 2004-07-08 09:52 am (UTC)(link)
It's probably worth pointing out that in this particular respect IE is standards-compliant, it's just that the standard (sucks|doesn't do what you want).

Maybe CSS 3 will be better.