About using CSS hacks
The other day I posted my thoughts on the use of CSS hacks in Stop using CSS hacks now. I rarely use CSS hacks, so I was a bit surprised to see so many people defend them.
Anyway, I do agree that whichever method you use to send different CSS rules to Internet Explorer you’ll have to be prepared to change some things when IE7 is finally released. Eric Meyer has written a couple of posts on the pointlessness of doing anything now: IE7 and IE7 and To Hack With It. Jonathan Snook has similar feelings: IE7 and the use of CSS Hacks. Both of them make good points.
So the conclusion is that whether you use CSS hacks, conditional comments, or neither, you will need to check if your sites are still OK when Internet Explorer 7 is released.
- Previous post: Apple updates PowerBook and Power Mac G5 models
- Next post: Google, SEO and using CSS to hide text
Information, sponsorship, and externals
About the author
Roger Johansson is a Swedish web professional specialising in web standards, accessibility, and usability. More about me and this site.
Latest articles
- Validation statistics from Nikita the Spider Comments off
- An analysis of the sites crawled by the bulk validation tool Nikita the Spider during March 2008.
- Authentic Jobs API and Affiliates program Comments off
- The Authentic Jobs job listing service now has a public API and an affiliate program.
- What does Acid3 mean to you and me? Comments off
- Opera and Apple have announced that their web browsers pass the Acid3 Browser Test, but how will that help web designers and developers?
- Designing Web Navigation (Book review) Comments off
- Learn the fundamentals of navigation design and design better navigation systems for large and small sites as well as for web based applications.
- DOMAssistant bundle for TextMate Comments off
- To save keystrokes and speed up development I have created a DOMAssistant bundle for TextMate.
- First impressions of Internet Explorer 8 Beta 1 Comments off
- My impressions after trying out Internet Explorer 8 Beta 1 for a couple of days.









Comments
Of course, we need to know and test how IE 7 will actually work.
While Eric and Jonathan make good points, I personally promote using conditional comments for reasons expressed in Avoid CSS hacks (mostly in my comments) and in my comment at Eric Meyer's web site).
And it's not like IE 5 and IE 6 are going to go away just because IE 7 is being released (which will only work in Windows XP SP 2 and Windows Vista); we need to have a good, structured solution for the old IEs for a long time to come (probably for at least five more years...).
For everyone else out there, use what you feel is appropriate. But before you opt for hacks, make sure to read and grasp Chris' comment: CSS parser support and CSS parser bugs are two vastly different things.
Robert: I somehow managed to miss your post. Seems like we are in full agreement on this one ;-).
Having used 'conditional comments' for a long time, I'm not too worried about old hacks breaking IE7.
How well they actually fix IE7 is another matter. We just have to wait and see.
Assuming that everyone of us already tests his pages, that's no news, actually ;)
Jens: Hehe. Nope ;-).
I still confused what CSS Hack for? to reformat on different browser? or something else?
Thanks
Jauhari: CSS hacks are almost always used to send different rules to Internet Explorer, to compensate for its buggy CSS implementation.
Sorry, comments are closed for this post.