views:

35

answers:

3

Hy there...

I have a problem with Internet Explorer conditional comments...

I use this condition

<!--[if lte IE8]>
<link rel="stylesheet" type="text/css" href="http://www.bvp.hr/Static/Style/IEFix6.css"/&gt;
<![endif]-->

The problem is that in < IE8.0 i get output <!--[if lte IE8]><![endif]--> before any other output... Why?!? In Firefox it is rendered normaly (afkors).

+5  A: 

I believe all you need to do is add a space between IE and 8, so it looks like this:

<!--[if lte IE 8]> 
<link rel="stylesheet" type="text/css" href="http://www.bvp.hr/Static/Style/IEFix6.css"/&gt; 
<![endif]--> 
derekerdmann
Just for the reference: http://www.quirksmode.org/css/condcom.html
lunohodov
+2  A: 
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->

In the example above, theres a space between IE and 6. Just do the same for IE and 8:

<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="http://www.bvp.hr/Static/Style/IEFix6.css"/&gt;
<![endif]-->
meder
A: 

See above plus the comments at the top of your code will force IE into Quirks Mode which will make the rendering of the page poor. Remove these comments:

<!-- UUIDM component start --> 
<!-- Page generated by UUIDM component - part of WebSuite application platform. Copyright (C) Determinanta. All rights reserved. --> 
bjammin666