Reputation: 329
What is the difference between
#id .A.B x { }
#id .A .B y { }
in CSS file?
Both A and B are classes. x and y are some tags
Does the spacing between .A and .B have any significance?
Upvotes: 3
Views: 956
Reputation: 25685
In the first case, it references an element that has both A and B as classes:
<div class="A B"></div>
The second is an element with class A that has an element with class B nested inside:
<div class="A">
<div class="B"></div>
</div>
Upvotes: 6