I’m Available now to take any Projects or Part-Time Jobs
Twitter Facebook Dribbble

Blog

CSS for IE

Category blog
Author
Post Date March 08, 2011

Conditional

  • <!--[if IE 8]> = IE8
  • <!--[if lt IE 8]> = IE7 or below
  • <!--[if gte IE 8]> = greater than or equal to IE8

 


IE CSS hacks

  • 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.

 
.box {

background: gray; /* standard */

background: pink9; /* IE 8 and below */

*background: green; /* IE 7 and below */

_background: blue; /* IE 6 */

}
Conditional HTML Class




This post was written by
Ahmed AG is a freelancer specializes in WordPress theme developments, HTML5 and CSS3 Web Design, SEO/SEM & Social Media Marketing. He has over 6 years of web design experience

Leave Your Comment

© 2008-2012 Ahmed AG