This article to give you a brief description of div+css relative IE6 IE7 and IE8 compatibility issues, focus on the IE6 IE7 and IE8 and other browser differences and contacts, I believe this article will let you have some harvest.
Div+css relative IE6 IE7 and IE8 compatibility problem collation
1. Distinguish IE and non ie browsers
The following is a code fragment:
#tip {
background:blue;/* Non IE background color * *
Background:red9;/*ie6, IE7, IE8 background color * *
}
2. Difference Ie6,ie7,ie8,ff
"Difference symbol": "9", "*", "_"
"Sample":
The following is a code fragment:
#tip {
Background:blue;/*firefox Background to Blue * *
BACKGROUND:RED9;/*IE8 Background Red * *
*BACKGROUND:BLACK;/*IE7 Background Change Black * *
_BACKGROUND:ORANGE;/*IE6 Background Change Orange * *
}
"description": Because the IE series browser can read "9", and IE6 and IE7 readable "*" (m), IE6 can be recognized "_" (bottom line), so you can write down in order, it will allow the browser to read the correct view of their own CSS syntax, So it can effectively differentiate IE versions and non ie browsers (like Firefox, Opera, Googlechrome, Safari, etc.).
3. Distinguish IE6, IE7, Firefox (Method 1)
"Difference symbol": "*", "_"
"Sample":
The following is a code fragment:
#tip {
Background:blue;/*firefox Background to Blue * *
*BACKGROUND:BLACK;/*IE7 Background Change Black * *
_BACKGROUND:ORANGE;/*IE6 Background Change Orange * *
}
"description": IE7 and IE6 readable "*" (m), IE6 can read "_" (bottom line), but IE7 can't read "_", as for Firefox (non IE browser) is completely unable to identify "*" and "_", so you can distinguish between IE6, IE7, Firefox
4. Distinguish IE6, IE7, Firefox (Method 2)
"Difference symbol": "*", "!important"
"Sample":
The following is a code fragment:
#tip {
Background:blue;/*firefox Background to Blue * *
*BACKGROUND:GREEN!IMPORTANT;/*IE7 Background Change Green * *
*BACKGROUND:ORANGE;/*IE6 Background Change Orange * *
}
"description": IE7 can identify "*" and "!important", but IE6 can only identify "*", but cannot identify "!important", as Firefox can read "!important" but cannot identify "*" So the difference can be used to effectively partition IE6, IE7, Firefox.