Home › Forums › CSS › A question of Class's › Reply To: A question of Class's
November 24, 2015 at 3:25 pm
#235194
Alex Zaworski
Participant
Well, those selectors are actually totally different.
div.class {
color:blue;
}
Will only, obviously, affect div
elements. If you were to use .class
instead, it will affect every element with the class.
It’s also a different level of specificity. Suppose you have the following:
div.class {
color:red;
}
.class {
color:blue;
}
The applied style will be color:red
since the selector is more specific.
edit: Ah, was too slow