Hackery, Math & Design

Steven Wittens i

The IE7 Myth

A while ago, we got contacted at Drupal.org by the Internet Explorer 7 compatibility team about layout issues in IE7 on our site. The e-mail was intended to help web developers prepare for IE7 by pointing out problems. My guess was that Microsoft had used a web crawler to look for various CSS signposts (with human verification afterwards):

"The page www.drupal.org does not display properly in IE 7 due to specific CSS Hacks that we have deprecated in IE 7. We believe that this issue is likely caused by the use of the Underscore, html>body and Star HTML Hacks on your CSS file which has been removed from IE 7. In IE 6, the layout appears correct since the specific hack being used is supported in that version of IE. ... Removal of these hacks will resolve this issue."

I got really annoyed by that last line because it's plain untrue. What's worse is that I've noticed similar comments made by others in the Drupal community (and elsewhere): "[Some site] is broken in IE7 because they use IE6 hacks". As the person who designed the Drupal.org theme, I want to clear this up because it's a big fat lie and it's easy to see why.

Any sane designer these days will design for the standards-compliant browsers like Firefox and then sprinkle on CSS hacks to make it work in IE6. The very nature of these hacks is that they are invalid CSS, which only IE6 considers valid (e.g. a { _display: none; }). Standards-compliant browsers ignore invalid CSS rules (as specified in the specs), so the hacks have no effect on them.

Because IE7 fixed the parsing bugs, it can now be considered one of those standards-compliant browsers (for parsing CSS anyway). This means that whether IE6 hacks are present or not will have no effect whatsoever on how the site looks in IE7.

So, whether intentional or not, Microsoft has been flat out lying. And by doing so they're shifting the blame for their screw-ups to the same designers they've been torturing for years.

Well, I'm tired of taking the blame: my design works fine in those programs that are worthy of the name browser.

Browser  CSS/XHTML  Drupal  IE7

This article contains graphics made with WebGL, which your browser does not seem to support.
Try Google Chrome or Mozilla Firefox. ×