Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
I prefer a much easier solution (yes, I'm a lazy hacker).
If you want to send a rule to IE6, precede the rule with a '_' like this:
p.example {
margin: 4px;
_margin: 6px; /*targets IE6 and below*/
}
Or, you can target IE7 and below as such:
p.example {
margin: 4px;
*margin: 8px; /*IE7 and below*/
}
Or, in combination:
p.example {
margin: 4px;
*margin: 8px;
_margin: 6px;
}
*Warning: Eventually, Microsoft will release IE8. Hopefully they will fix the bug that allows IE7 to be targeted in this manner. However, there is no telling what Microsoft will do. This means, unfortunately, that this hack will *break* your layout. Considering all the new difficulties that new browsers by MS means, however, this is relatively minor, to me.
|