i have a problem in using IE. Everthing is good in using firefox but IE 6 seems to be creating more trouble for css. so i used
<![if !IE]>
<link href="ie6.css" rel="stylesheet">
<![endif]>
To fix a problem but it doesnot work. Anything wrong in this code? Because when i altered this css nothing has changed in IE.
6 Answers 6
Well, your conditional comment says "if not IE".
Also note that you're using a downlevel-revealed conditional comment, which means every browser (except IE) will include the extra CSS file.
Use <!--[if IE]><![endif]--> instead.
1 Comment
Try using this condition statement:
<!--[if lt IE 7]>
<link href="ie6.css" rel="stylesheet">
<![endif]-->
Basically its saying if the browser is less than IE7 then use this style sheet. Works for me.
Comments
Try
<!--[if lte IE 6]><link href="ie6.css" rel="stylesheet"><![endif]-->
1 Comment
lte IE 6; IE <= 5.5 has many other quirks to deal with, as IE 6 Standards Mode differs very much from IE 5.5's rendering engine, also known as Quirks Mode in IE >= 6.I'm using this;
<!--[if IE 6]>
this place for your stuff.
<![endif]-->
Comments
Change:
<![if !IE]> ! means not IE there
To:
<![if IE]> means if it is IE
to use IE-based CSS.
1 Comment
Is the ie.css placed after any other css files? If you have placed it before your regular css it will be overridden. It should look something like this:
<link href="other.css" rel="stylesheet">
<![if IE]>
<link href="ie6.css" rel="stylesheet">
<![endif]>