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
Subscribe / follow
Sponsors
Authentic Jobs
- UI Designer at charity: water (New York City, Ne, US)
- Creative Director at Ai (Alexander Interactive) (New York, NY, Ne, US)
- Front-end WordPress Developer - Contract to Hire at HyperArts (Oakland, CA, Ca, US)
- Developers at STV (Glasgow, GB)
DreamHost web hosting
Use the promo code 456BEREASTREET3 to save USD 20 when you sign up for DreamHost


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.
Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.