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.

Comments

  1. FireFoxMan

    But, if you didn&#039t have those hacks, how did you properly implment CSS, Nick? It was IE that broke the Box model, not us poor developers!

  2. Rafael Apocalypse

    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...

Understanding JavaScript Promises E-book Cover

Demystify JavaScript promises with the e-book that explains not just concepts, but also real-world uses of promises.

Download the Free E-book!

The community edition of Understanding JavaScript Promises is a free download that arrives in minutes.