Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE condition CSS include

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"/>
<![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).

like image 659
Stazh Avatar asked Aug 17 '10 15:08

Stazh


People also ask

Can CSS have conditionals?

CSS Conditional Rules is a CSS module that allows to define a set of rules that will only apply based on the capabilities of the processor or the document the style sheet is being applied to.


1 Answers

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"/> 
<![endif]--> 
like image 152
derekerdmann Avatar answered Sep 23 '22 19:09

derekerdmann