Theming Drupal with multi class selectors
sometimes it's useful to check for the existence of two classes in an element before applying a style to it. For example, if you have a front page that has a different width sidebar than an interior page, you could use a separate page-front.tpl.php file, kind of overkill of your just changing the width of the sidebar.
Another option is to use what http://www.bennadel.com/blog/680-Defining-A-CSS-Selector-That-Requires-A... calls multi class selectors.
.front.sidebar-left #content{
width:760px;
margin-left:436px;
margin-right:-1196px;
border:solid 1px blue;
}
will check for the existing of front and sidebar left, before applying width to the #content div.
You can then have a separate instructions set for the #content div on interior pages with sidebars.
.sidebar-left #content
{
width: 760px;
margin-left: 200px; /* The width of #sidebar-left. */
margin-right: -960px; /* Negative value of #content's width + left margin. */
}
not this is different than setting the width of the sidebars themselves, which is easy with either #sidebar-left or .front #sidebar-left.