This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Meysam
Meysam

I can inject a CSS file into my page using:

public function onRun()
{
    $this->addCss('http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css');
}

I don't know though, how can I check the IE version in the code above? What's the equivalent of the following CSS code?

<!--[if lte IE 8]>
    <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
    <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->

Last updated

Crazymodder
Crazymodder

hi,

you can use in your template

{% put styles %}
<!--[if lte IE 8]>
    <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
    <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->
{% endput %}

Greets Crazymodder

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.