0
In CSS, when defining class H2, for example, it does not start with dot:
H2 { color: red; }
But other classes need the point:
.text-red { color:red; }
Why does this happen?
0
In CSS, when defining class H2, for example, it does not start with dot:
H2 { color: red; }
But other classes need the point:
.text-red { color:red; }
Why does this happen?
Browser other questions tagged css web-application classes
You are not signed in. Login or sign up in order to post.
Answered in What is the definition of each css selector combination
– Bacco
@Bacco when it is so, it is better to answer or let the user query the old answer, because this will be deleted?
– hugocsl
Without the point vc is applying to an html element H2 directly and not necessarily the class
– N. Dias
@hugocsl the ideal is to vote for closing by duplicate (if you have enough score), because this one becomes link to the original. If you have something to add, it pays to post one more reply in the original as well, instead of this one.
– Bacco