Problems with .23 : Pseudo Selectors

Hey,

I’ve got the following message : “Oops, try again. Did you give your third paragraph a font-size of 26px? It looks like it’s currently undefined.”

with the following code :
p:nth-child(3) {
font-size:26px;
}

As i think that p is the third child of h3 : could you explain me why it doesn’t work ?
Can we say that p is also the 4th child of body, even if it’s not directly ?

Many thanks,

<do not remove the three backticks above>

this depends on your html code

the paragraphs shouldn’t be inside the heading elements, as answered in this stackoverflow question:

its not valid

2 Likes

ok, clear.
my html code was :

Result

Titre

Paragraphe

Paragraphe 2

Paragraphe 3

so that was actually the problem !
thanks a lot mate.