css for ie

http://html5boilerplate.com/ is a good css framework 



 
 


http://css-tricks.com/how-to-create-an-ie-only-stylesheet/


Another explanation is more better:

http://stackoverflow.com/questions/814219/how-to-target-ie7-ie8-with-css-valid-code

Explicitly Target IE versions without hacks using HTML and CSS Use this approach if you don't want hacks in your CSS. Add a browser-unique class to the element so you can select based on browser later. Example





    
    
Then in your CSS you can very strictly access your target browser.



Example
.ie6 body { 
    border:1px solid red;
}
.ie7 body { 
    border:1px solid blue;
}
For more information check out http://html5boilerplate.com/
Target IE versions with CSS "Hacks"
More to your point, here are the hacks that let you target IE versions.
Use "\9" to target IE8 and below.
Use "*" to target IE7 and below.
Use "_" to target IE6.
Example:
body { 
border:1px solid red; /* standard */
border:1px solid blue\9; /* IE8 and below */
*border:1px solid orange; /* IE7 and below */
_border:1px solid blue; /* IE6 */
}

评论

热门帖子