Forum Moderators: not2easy

Message Too Old, No Replies

How to override specific parts of a CSS?

noob needs help

         

Snoader

8:40 pm on Nov 27, 2007 (gmt 0)

10+ Year Member



Suppose I have a default CSS file:

A {...}
B {...}
C {
1
2
3
4
}
D {...}

But, in case of IE6, it should be:

A {...}
B {...}
C {
1
2
3
}
D {...}

Is there a way to get this done, by overriding or something like that? I mean, I could use 2 complete stylesheets, but that would not be very efficient, because the difference between the 2 stylesheets is only one line (the '4' in C).

Thanks in advance!
Sander

your_store

8:46 pm on Nov 27, 2007 (gmt 0)

10+ Year Member



Google for "ie css hacks" to find out how to do it in your main file.

I always keep all my IE fixes in a separate stylesheet and load it using conditional comments. That way you're guaranteed it will only affect IE.

gobinath success

1:27 pm on Dec 7, 2007 (gmt 0)

10+ Year Member



<!--[if IE]>
According to the conditional comment this is Internet Explorer<br />
<![endif]-->
<!--[if IE 5]>
According to the conditional comment this is Internet Explorer 5<br />
<![endif]-->
<!--[if IE 5.0]>
According to the conditional comment this is Internet Explorer 5.0<br />
<![endif]-->
<!--[if IE 5.5]>
According to the conditional comment this is Internet Explorer 5.5<br />
<![endif]-->
<!--[if IE 6]>
According to the conditional comment this is Internet Explorer 6<br />
<![endif]-->
<!--[if IE 7]>
According to the conditional comment this is Internet Explorer 7<br />
<![endif]-->
<!--[if gte IE 5]>
According to the conditional comment this is Internet Explorer 5 and up<br />
<![endif]-->
<!--[if lt IE 6]>
According to the conditional comment this is Internet Explorer lower than 6<br />
<![endif]-->
<!--[if lte IE 5.5]>
According to the conditional comment this is Internet Explorer lower or equal to 5.5<br />
<![endif]-->
<!--[if gt IE 6]>
According to the conditional comment this is Internet Explorer greater than 6<br />
<![endif]-->