23. pseudo selectors


#1

Hi,

could anyone check my code?

.fancy {
font-family: cursive;
color: violet;
}

serious{

font-family: Courier;
color: #8C8C8C;

}
p :nth-child(4) {
font-size: 26px;
}


Pseudo selectors 23 [Solved] Need space after "body" - descendant selectors vs pseudo selectors
#2

you can't have a space a space between p and :nth-child, without the space it will select the 4th element which is a paragraph of any parent, while with space you select the 4th element nested inside the paragraph


#5

I've already deleted the space, still it doesn't work


#6

your html code is wrong, in exercise21,22 and 23 you have to build the right headings/paragraphs. exercise 21: a h3 heading (close before the paragraph), a paragraph. exercise 22: another paragraph, exercise 23: another paragraph. Only if you have this html code, it will work. Don't add additional headings, it messes up the count.


#7

How about this?





Result



sfsfs

sfdsfd


sdffsf



menu list


Pseudo Selectors




#8

you added h1 and h2 headings, never nest paragraph inside heading (your h3 should be closed before you even start any paragraph) and the 3 is missing in the closing tag of the h3 heading

revisit the exercises if needed to get the html structure right


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.