I need to point out that: every DIV tha...">

CSS classes: base + optional. How to determine?

I have a div:

<div class="navigation mainPage"></div> 

I need to point out that: every DIV that has a class of "navigation" and a class of "mainPage" should have a "width: 999px".

Is it possible? THX

+4
source share
3 answers
 .navigation.mainPage { width: 999px; } 
+7
source

You can try

 .navigation.mainPage { width: 999px; } 

but this one does not work in IE6 . You can try to get by doing

 <div class="navigation navigation-mainPage"></div> 

and then CSS

 .navigation-mainPage { width: 999px; } 

Even if this is not the most pleasant solution, but I do not know anyone else.

+2
source

Try the following:

 .navigation, .mainPage{ width:999px; overflow:hidden;} 
-2
source

All Articles