Reputation: 1634
i am using a conditional statement inside the head to use a style sheet based on ie browser version. i was under the impression that if you specified a style sheet based in the conditional if statement it should only use that one. i have a style sheet for ie6 and one to cover 7/8 ff etc. ie6 seems to be using a mixture of both. is this correct? thanks
main style sheet for 7/8 ff etc
<link href="css/style.css" rel="stylesheet" type="text/css" />
and based on browswer a call to ie6 stylesheet.
<!--[if IE 6]>
<link href="css/ie6-style.css" rel="stylesheet" type="text/css" media="screen, projection">
<link href="css/ie6-dropdown-menu.css" rel="stylesheet" type="text/css" media="screen, projection">
<![endif]-->
Upvotes: 0
Views: 143
Reputation: 5700
The stylesheet linked in the conditional comment will not replace the other style sheet. Both will be loaded. It is usually easier to work this way, with the IE6 version only containing overrides.
If you want IE6 to ignore the other file, use a negative condition.
<!--[if !IE 6]><!--> DEFAULT STYLE SHEET <!--<![endif]-->
<!--[if IE 6]> IE STYLE SHEET <![endif]-->
Upvotes: 2