Skip to content Skip to sidebar Skip to footer

Are There W3c-compatible Hacks For Ie6 And 7?

Are there valid hacks in IE6 and 7 for W3C compatibility? I believe there are W3C incompatibilities when using hacks. For example, using the following CSS code (as suggested under

Solution 1:

This alternative hack should do it:

/* Both of the following will be used by IE only. */
* html.box{height:200px;} /* IE6 only */
*+html.box{height:200px;} /* IE7 only */

Solution 2:

Options 1 and 3 in that article — i.e. HTML conditional comments — are the way to go. They don’t trip up the HTML validator, and they’re explicit — they say “use this code for this version of IE”.

You can use them to apply different stylesheets that only fix Internet Explorer bugs. This keeps your IE bug workarounds separate, so that when, for example, the IE6 countdown reaches zero, you can remove your IE 6-specific CSS without affecting anything else.

Post a Comment for "Are There W3c-compatible Hacks For Ie6 And 7?"