Some people, like Jens Meiert, have argued that using conditional comments to fix layout bugs for IE is wrong. For those of you who don't know what they are, check out my article on conditional comments. I on the other hand, think that it's the only proper way of working around IE CSS bugs.
If you use "old-style" CSS hacks, you're bound to end up in trouble once the IE team decides to fix yet another bug. Because that's what these CSS hacks do: they rely upon bugs in IE to make sure it parses the CSS the way YOU want it to. Conditional comments, on the other hand, rely on a built-in feature, provided to you by the IE developer team to work around your problems. Which one of these do you think has the most chance of surviving the coming years? Right.
Richard Rutter gives a very wise comment on Jens' post, basically agreeing with my opinion, but he says the following as well:
In terms of reliable use among teams, it is of course advisable to avoid CC or CSS hacks wherever possible, however as we all know life isn’t that simple. So where IE-specific workarounds are needed, our workflow is to put those rule in a separate style sheet called via CC and - most importantly - to document the normal style sheet where rules are being overwritten (as is normally the case).
Document those overrides, and do that all the time. If you do that, conditional comments are surely the best way to make sure your layout works in al browsers.






Comments closed, if you feel you have something to say:
drop me a line.