Death to CSS Hacks

I’ve never used a CSS hack and I’ve never taught a CSS hack. If the design I wanted reuqired a hack, I changed my design. Why? Well, this post from the IEBLog titled Call to action: The demise of CSS hacks and broken pages is what I’ve been warning people would happen for a few years now…

“We’re starting to see the first round of sites and pages breaking due to the CSS fixes we have made. We would like to ask your help in cleaning up existing CSS hacks in your pages for IE7. It is has been our policy since IE6 that under quirks doctype we will not make any behavioral changes so that existing pages will continue to render unmodified, but under the strict doctype we want to change behavior to be as compliant as possible with the web standards. For IE7, we introduced new CSS functionality (see Chris’ blog post for the full list) and cleaned up our parser bugs. This leads now to several CSS hacks failing. If you are using IE7 (you are MSDN subscriber or received a copy at the PDC) you may notice major sites breaking due to the use of CSS hacks and the strict doctype. “

I that didn’t make much sense here’s the point: If you’re using certain CSS hacks (as discussed in detail in the article,) you site will break in IE7 unless you add yet more code. Here’s a more simple solution: quick using hacks!

Posted in UncategorizedTagged ,

Leave a Reply

Your email address will not be published. Required fields are marked *