pixelhandler

Pushin' & pullin' pixels on the net

Target Specific Browsers With Css Class on Body Element

If you have some time a great blog to browse is paulirish.com ; Paul Irish has a boilerplate project for html5 that uses the following example to target specific web browsers using a css class. CSS definitions and JavaScript behavior can be hooked into the page referencing the classes, e.g. ie7, ie8, etc.
<!--[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)|!(IE)]><!--> <body> <!--<![endif]-->

Comments