23. Pseudo Selectors (again...)


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

https://www.codecademy.com/courses/web-beginner-en-WF0CF/4/5?curriculum_id=50579fb998b470000202dc8b#

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

I’m getting this repeated error message
‘Oops, try again. Did you give your third paragraph a font-size of 26px? It looks like it’s currently undefined.’
But I’m not sure what the problem is!! Check it out below…

```

HTML

Result

FANCY

Fancy also

Now it's serious

Children

CSS
.fancy {
font-family: cursive;
color: violet;
}
#serious {
font-family: Courier;
color: #8c8c8c;
}
body: nth-child(4) {
font-size: 26px;
}

<do not remove the three backticks above>


Any help really appreciated!!

#2

your h3 closing tag looks a bit off. to select the 4th element inside body you should have body :nth-child(4) (space between body and colon, not colon and nth-child)


#3

Thanks for your input! But it’s still not happy… Now I’m getting ‘Did you give your third paragraph a font-size of 26px? It looks like it’s currently undefined.’


#4

could you post an updated version of your code? Or i am suppose just to guess?


#6

Still got the same issue! Mystery!

/*Add your CSS below!*/
.fancy {
    font-family: cursive;
    color: violet;
}
#serious {
    font-family: Courier;
    color: #8c8c8c;
}
body :nth-child (4) {
    font-size: 26px;
}
<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body>
		<!--Add your HTML below!-->
		<h3 class="fancy">FANCY</h>
		<p class="fancy">Fancy also</p>
		<p id="serious">Now it's serious</p>
		<p>Children</p>
	</body>
</html>

#7

i wouldn’t put a space between nth-child and (4), given it is part of the same psuedo class.

your h3 closing tag still looks off, messing up the count


#8

Hmm, bit of a confusing code there - images might be a bit clearer…


#9

i did the mark up for you code, but next time you can do it yourself:

My points in my previous reply still stand:


#10

!!!

....

h3tag not closed

#11

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