Reputation: 599
Why use div.classname instead of just .classname
.classname{
color: red;
}
div.classname{
color: red;
}
Upvotes: 1
Views: 52
Reputation: 5468
A higher specificity means a higher priority
i.e. the properties of div.classname{} would override properties specified in .classname{} and target only Div elements
Upvotes: 4