Answer the question
In order to leave comments, you need to log in
Explain why the first _description is not highlighted?
There is such an example https://jsfiddle.net/uanzk6pb/6/ , but why is the first description not highlighted? at the same time the heading is tinted. Even if you leave only the .landing-block__description:first-child selector, it won't work
Answer the question
In order to leave comments, you need to log in
Not highlighted because the pseudo :first-child
-class points to the first element among all elements, not the first element with the given class.
Essentially, a selector .landing-block__description:first-child
means an element with the class .landing-block__description
that comes first in the markup.
But he's not the first. Before it there is still an element with the class.landing-block__title
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question