This is the Hack for internet explorer
these lines are only executed when we use internet explorer
body {
color: red; /* all browsers, of course */
color : green\9; /* IE8 and below */
*color : yellow; /* IE7 and below */
_color : orange; /* IE6 */
}
#div { height: 300px\9; }
these lines are only executed when we use internet explorer
- IE8 or below: to write CSS rules specificially to IE8 or below, add a backslash and 9 (
\9
) at the end before the semicolon. - IE7 or below: add an asterisk (
*
) before the CSS property. - IE6: add an underscore (
_
) before the property.
body {
color: red; /* all browsers, of course */
color : green\9; /* IE8 and below */
*color : yellow; /* IE7 and below */
_color : orange; /* IE6 */
}
#div { height: 300px\9; }
No comments:
Post a Comment