I need to target IE6 only to fix a bug. I know conditional style sheets would be better but I only have access to the CSS not HTML (long story).
It seems like I can achieve this with either of the following:
*html .mydiv {
height: 40px;
}
.mydiv {
_height: 40px;
}
Is one solution better than the other?
Thanks
The second option,
_height: 40px;is unrecommended, as it doesn’t validate properly against W3C standards. You can read more about IE6 hacks here: http://www.webdevout.net/css-hacks#in_css.As far as I am aware, both should be applied to only IE6 and below.
Regardless of this, the choice would depend on the context. The former would be better for a group of fixes for IE6, and the latter for a single property in an already existing group.