While working on the new dropdown menu system I’ve come across something interesting.
I need to float LI
elements but doing so triggers rendering bugs in Opera. So I set about finding a CSS hack to hide CSS from IE7. Of course IE7 has a lot of its parsing bugs fixed.
But then I found this one:
ul.menu[class] li
And here’s the thing. In previous versions of IE it would ignore the selector completely. In IE7 it appears to ignore everything after [class]
meaning the CSS is applied to ul.menu
and not ul.menu li
.
Of course IE7 is still beta and this parsing bug might be fixed sooner than later. Thing is.. this hack actually works well for what I’m doing (unsetting the float property which isn’t set to begin with on the ul.menu
element, meaning unsetting it with float: none;
doesn’t do anything for IE.