Search Blog Posts

IE Only CSS Hacks and 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]–>

Tags: , ,

Post this story to Delicious Post this story to Digg Post this story to Technorati Post this story to SumbleUpon Post this story to Facebook Post this story to Reedit

Leave a Comment

  1. XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© Copyright 2003-2008 Minimalistic Designs | Terms | Links | Sitemap
Website Design Liskeard - www.minimalistics.co.uk