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:[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 and not 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 element, meaning unsetting it with float: none; doesn’t do anything for IE.


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s