Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 871
Franklin.s.dev Avatar asked Nov 01 '22 12:11

Franklin.s.dev


1 Answers

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

like image 131
brenjt Avatar answered Nov 12 '22 12:11

brenjt