What is the difference between the selectors ".class.class" and ".class .class"?
.name1.name2
means a
div
or anelement
having both classes together, for example:<div class="name1 name2">...</div>
.name1 .name2
means a
div
or anelement
which has a classname1
and any of its child nodes having classname2
<div class="name1"> <div class="name2"> ... </div> </div>
.class .class
matches any elements of class .class
that are descendants of another element with the class .class
.
.class.class
matches any element with both classes.