Last Updated: February 25, 2016
·
526
· rajeshkhatri13

Write IE Class for different element

<!--[if lte IE 7]> <html class="ie7"> <![endif]-->

<!--[if IE 8]> <html class="ie8"> <![endif]-->

<!--[if IE 9]> <html class="ie9"> <![endif]-->

<!--[if !IE]><!--> <html> <!--<![endif]-->

<--- Body ---->

<div class="box">Box</div>

<--- CSS ---->

.ie7 .box{background:red;}

.ie8 .box{background:green;}

.ie9 .box{background:blue;}

You can set fixes in this format, without using hacking like "*" and "_"