IE7 Hack?

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s