Some interesting new CSS hacks:
body {
color: red; /* all browsers, of course */
color : green\9; /* IE8 + IE9 and below */
*color : yellow; /* IE7 and below */
_color : orange; /* IE6 */
}
Sure, specific CSS should be served using conditional comments, but every so often, a good ol’ CSS hack is just so useful.
[Update]: The IE8 hack no longer works. Here’s a working one courtesy of Paul Irish:
@media \0screen {
body {
color: green; /* IE8 */
}
}
@media screen\0 {
body {
color: green; /* IE8 and IE9 */
}
}
css hack … http://noscope.com/journal/2010/03/quick-tip-how-to-target-ie6-ie7-and-ie8-uniquely-with-4-characters-nettuts
Been back to this page plenty of times haha
I wish these weren’t still useful. #cssHacks http://noscope.com/journal/2010/03/how-to-target-ie6-ie7-and-ie8-uniquely-with-4-characters
thanks so much
Thank you!