PDA

View Full Version : Conditional Statement, should be working..but isn't



mitchrenton
06 Aug 2008, 11:01 AM
I am trying to use the below statement to fix some problems with rendering in IE6, this is the code i am using but IE6 is still using the style.css file and not the iespecific.css file. Does anybody see a problem here or have any other ideas why this isn't working? help wll be much appreciated

<!--[if lte IE 6]>
<link href="css/iespecific.css" rel="stylesheet" type="text/css" media="screen" />
<![endif]-->
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />

MitchR

Wickham
06 Aug 2008, 11:06 AM
A browser processes a page code from the top, so it reaches the [if lte IE 6] and then reaches the main stylesheet link and overrides the previous styles if there are the same ones in the main stylesheet.

Always put the conditional comment after main stylesheets.