The Death of IE CSS Hacks
I’ve always believed that you should never write production code that is based on an incorrect implementation of something. Yet, tons of developers rushed to use Internet Explorer-specific CSS hacks to make their pages look consistent across multiple browsers. For a complete list of CSS hacks, check out CSS Filters – CSS Only Hacks.
Now comes the news everyone feared: IE7 parses CSS correctly, which means an end to the hacks that some developers have come to depend on. This means that many, many sites out there will begin to break in IE7.
This is the time when all the standards-supporters say “ha!” They then proceed to point and laugh and say, “I told you so.” And for once, they are right. Relying on hacks for production code is never a good idea. Maybe this will force developers to clean up their act.
Disclaimer: Any viewpoints and opinions expressed in this article are those of Nicholas C. Zakas and do not, in any way, reflect those of my employer, my colleagues, Wrox Publishing, O'Reilly Publishing, or anyone else. I speak only for myself, not for them.
Both comments and pings are currently closed.




2 Comments
But, if you didn't have those hacks, how did you properly implment CSS, Nick? It was IE that broke the Box model, not us poor developers!
FireFoxMan on October 26th, 2005 at 5:01 pm
Everytime that I need an hack, I use _ before the style [ _width: 50px ]. So, when a trully browser see that it just ignore, but IE recognize and act.
IE 7.0 will be avaliable only for Vista users, and not anybody will be a vista users.
Yet, if every body starts to use IE 7.0 my hacks will just be ignored, and all my sites will be like know, almost perfects…
Rafael Apocalypse on November 7th, 2005 at 5:44 am
Comments are automatically closed after 14 days.