This time I was combining id's and classes. This is my HTML:
<div id="article" class="l-fixed"> Article </div>
CSS:
#article { width: 80%; float: left; border: 2px solid black; } .l-fixed#article { width: 600px; }
Notice that there is no space in selectors:
.l-fixed#article
Like this we can add class on the same element with id, otherwise, with space:
#article { width: 80%; float: left; border: 2px solid black; } .l-fixed #article { width: 600px; }
I would need nested element, something like:
<div class="l-fixed"> <div id="article"> Article </div> </div>