If I have the following div:
<div class="sectionA" id="content">
Lorem Ipsum...
</div>
Is there a way to define a style that expresses the idea "A div with id='content'
AND class='myClass'
"?
Or do you have simply go one way or the other as in
<div class="content-sectionA">
Lorem Ipsum...
</div>
Or
<div id="content-sectionA">
Lorem Ipsum...
</div>
use:
tag.id ; tag#class
in the tag variables in your css.Well generally you shouldn't need to classify an element specified by id, because id is always unique, but if you really need to, the following should work:
You can combine ID and Class in CSS, but IDs are intended to be unique, so adding a class to a CSS selector would over-qualify it.