This example illustrates the differences in css between IE6 IE7 and IE8 FireFox. Different codes can make websites compatible ~~~~
Code
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> CSS hack </title>
<Style type = "text/css">
. Color {
Background-color: # CC00FF;/* all browsers are purple */
Background-color: # FF0000 \ 9;/* IE6, IE7, and IE8 are displayed in red *//
* Background-color: # 0066FF;/* IE6 and IE7 change to blue */
_ Background-color: #009933;/* IE6 turns green *
}
-->
</Style>
</Head>
<Body>
<Div id = "test" class = "color"> csscsss </div>
<Div id = "note">
<Strong style = "color: #009933"> IE6 </strong>
<Strong style = "color: # 0066FF"> IE7 </strong>
<Strong style = "color: # FF0000"> IE8 </strong>
<Strong style = "color: # CC00FF"> FireFox </strong>
</Div>
</Body>
</Html>