Franklin.s.dev
Franklin.s.dev

Reputation: 93

How can I to specific the css rules for Chrome and IE in my HTML page or in SCSS file?

I want to specific that the web browsers as chrome, opera, firefox use specific css file and the browsers as IE (from version 7 to 10) using another css files.

How can I to specific this??

Thanks everyone for your help! merry christmas!

Upvotes: 5

Views: 521

Answers (1)

brenjt
brenjt

Reputation: 16297

You can use IE conditional comments such as this:

<!--[if IE]>
    According to the conditional comment this is IE<br />
<![endif]-->

So you could use something like this:

<head>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <!--[if lte IE 10]>
        <link href="iestyles.css" rel="stylesheet" type="text/css" />
    <![endif]-->
</head>

You can learn more about them here

Upvotes: 2

Related Questions