A friend of mine recently sent me this article in defense of using inline hacks instead of conditional statements for IE-specific styles. Â I disagree with a lot of things in that article (see user Alex’s comments for a good summary of my thoughts), but I mostly use conditional statements for two reasons: 1) It makes code easier to maintain; and 2) I want to punish IE users. Â If I have to use extra HTTP requests to exact said punishment, so be it.
Get a real browser.
if you don’t mind my asking, how is having multiple files easier to maintain than:
height:10px; *height:15px;
? Everything in the same place!
See, I think of conditional statements of having “everything in the same place”: all of my IE-specific styles in the same place.
You say potato…
Also, I think shooting for validation is a good idea. I’m not going to check my work in EVERY browser, so having valid CSS helps ensure that the ones I don’t check will probably look okay.
I have to agree with this person: http://briancray.com/2009/04/16/target-ie6-and-ie7-with-only-1-extra-character-in-your-css/#comment-706
to quote that guy from jerry mcguire, “Where’s the [browser] Jerry? Show me the [browser that breaks on the ie hack]!” Until this is done I don’t think the argument that ‘it *could* break something’ really holds water.
also from comment 111: “If ‘valid’ css does not work across browsers then who cares about W3C standards.” Sad but true, and unfortunately my clients/employer don’t give a hoot about whether something “validates,” they want it to “look right” and “be done now.”