XF 1.2 IE conditionals not working


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:

<xen:hook name="page_container_head">
    <!--[if lt IE 9]>
    <xen:require css="IE.css" />
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?

Chris D

XenForo developer
Staff member
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:

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