JJmason
JJmason

Reputation: 15

Force IE to ignore other css style sheets

I have nearly finished the site i am working on, however IE doesn't accept some of my animations.

I know i can specify a IE only sheet:

<!--[if IE]>
    <link rel="stylesheet" type="text/css" href="path/to/stylesheet.css"></link>
<![endif]-->

However IE still runs the other style sheet, Does anyone know a way to force IE to ignore a css style sheet?

regards, Jimy

Upvotes: 0

Views: 782

Answers (2)

rfoo
rfoo

Reputation: 1198

Since CSS stands for cascading style sheet the idea for these conditional sheets is to override the "normal css"

<link rel="stylesheet" type="text/css" href="path/to/normalstylesheet.css"></link>
<!--[if IE]>
    <link rel="stylesheet" type="text/css" href="path/to/iestylesheet.css"></link>
<!--[endif]-->

Everything in the former would be over wrote by the latter stylesheet. If you have another specific reason to omit something though you can always use this.

<!--[if !IE]-->
    <link rel="stylesheet" type="text/css" href="path/to/notiestylesheet.css"></link>
<!--[endif]-->

Upvotes: 1

Anshad Vattapoyil
Anshad Vattapoyil

Reputation: 23463

You can use this,

<!--[if !IE]-->
  IE ignores this
<!--[endif]-->

Upvotes: 0

Related Questions