Pregunta

<!--[if lt IE 9]><link rel="stylesheet" type="text/css" href="/a/s/major-market/non-reponsive.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" href="/a/s/major-market/ie7.css"><![endif]-->

I have conditionally included this two statements. Now when I try to ovveride a similar css in ie7.css it doesnot work. for example

In non-reponsive.css:

.header .features{
   width:25%;
}

In ie7.css:

.header .features{
   width:20%!important;
}

This is not working for some reason. please help me figure it out.

¿Fue útil?

Solución

Ensure that the IE 7 conditional include is located below all other CSS declarations/includes within the page otherwise it will get overruled.

Otros consejos

I am quite sure ie7.css is not loaded at all. !important would override anything in other stylesheets. Actually, if ie7.css comes after non-responsive.css, !important is unnecessary anyways.

That's the most I can tell by looking at the information you have provided.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top