IE only CSS Hacks & IE 6 or below Hack
If you’ve created your website but want to style or change the formatting of your css depending on the users browser version, ie allows you to set a different css style sheet using this handy little hack.
Internet explorer recognises the following:
If you need to target any users browser that is just internet explorer simply use the follwoing code and place in your <head> </head> tags.
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/ie.css" mce_href="css/ie.css" />
<![endif]-->
If you need to target any users browser that is internet explorer below version 7, e.g. 6, 5, 5.5… use the following code and place in your <head> </head> tags.
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="css/ie6orlower.css" mce_href="css/ie6orlower.css" />
<![endif]-->
This entry was posted on Monday, September 28th, 2009 at 7:14 pm and is filed under CSS Tips & Tricks. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.