XF 1.2 IE conditionals not working

SonicRC

Well-known member
Hi! :)

It's the first time I have to work with IE conditionals. So I tried to put the following code in the page-container template:

Code:
<head>
<xen:hook name="page_container_head">
...
    <!--[if lt IE 9]>
    <xen:require css="IE.css" />
    <![endif]-->
</xen:hook>
</head>

If I do it that way, the IE.css gets applied on all Browsers(even on Firefox, Safari etc) not only on IE8 and below.

any idea why?
 
That'll be because the CSS is included via the compiled template which happens when the template is saved. The IE conditionals are evaluated as the page is loaded.

You may want to include the CSS directly in the template using <style> tags or, create an actual .css file with those customisations in, and include that as such:

Code:
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="styles/css/IE.css" />
<![endif]-->
 
Top Bottom