I've read the question about combining the class and ID in the CSS selector but it's not working for me and I don't know where I'm going wrong.
I have the following set of divs:
<div id="maincontent" class="2col clearfix">
<div id="leftcolumn">content</div>
</div>
and the following in my css:
#maincontent.2col {
width: 840px;
margin: 0px auto;
text-align: center;
}
#maincontent.2col #leftcolumn {
float: left;
width: 490px;
margin: 0 10px 0 0;
/*border: 1px solid #000;*/
text-align: left;
}
However, when I use firebug, nothing is happening to the #leftcolumn
div.
If I remove the .2col
from both it works as I would expect it to, but I'd like to have the 2col class in there as I'm going to be having a 3 column layout and I don't want to have more than one stylesheet. Any thoughts?
Edit: Apologies, that's not a misspelling in my HTML, that's a misspelling when trying to write it out here.