<!--[if lt IE 7 ]> <body class="ie6"> <![endif]--> <!--[if IE 7 ]> <body class="ie7"> <![endif]--> <!--[if IE 8 ]> <body class="ie8"> <![endif]--> <!--[if IE 9 ]> <body class="ie9"> <![endif]--> <!--[if (gt IE 9) ]> <body class="modern"> <![endif]--> <!--[!(IE)]><!--> <body class="notIE modern"> <!--<![endif]-->
And then having the CSS look like this:
#box { box-shadow: 0 0 15px #cccccc; -webkit-box-shadow: 0 0 15px #cccccc; -moz-box-shadow: 0 0 15px #cccccc; } body.ie6 #box, body.ie7 #box, body.ie8 #box { zoom: 1; filter: progid:DXImageTransform.Microsoft.Shadow(Color=#eeeeee, Strength=15, Direction=0), progid:DXImageTransform.Microsoft.Shadow(Color=#eeeeee, Strength=15, Direction=90), progid:DXImageTransform.Microsoft.Shadow(Color=#eeeeee, Strength=15, Direction=180), progid:DXImageTransform.Microsoft.Shadow(Color=#eeeeee, Strength=15, Direction=270); }
Is there a reason that they don't just do this, without any HTML if statements?
#box { box-shadow: 0 0 15px #cccccc; -webkit-box-shadow: 0 0 15px #cccccc; -moz-box-shadow: 0 0 15px #cccccc; /* IE stuff */ zoom: 1; filter: progid:DXImageTransform.Microsoft.Shadow(Color=#eeeeee, Strength=15, Direction=0), progid:DXImageTransform.Microsoft.Shadow(Color=#eeeeee, Strength=15, Direction=90), progid:DXImageTransform.Microsoft.Shadow(Color=#eeeeee, Strength=15, Direction=180), progid:DXImageTransform.Microsoft.Shadow(Color=#eeeeee, Strength=15, Direction=270); }