23. pseudo selectors


#1

I have the same problem. Even if i do put a space after body :nth-body(4)
it wont let me pass :confused:


23. pseudo selectors
#2

can i see your html code?


#3

/*Add your CSS below!*/
.fancy {
    font-family: cursive;
    color: violet;
}

#serious {
    font-family: Courier;
    color: #8C8C8C;
}

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

#4

Could you paste in your HTML code, also what error are you getting ?


#5

still does nothing. Ive used this code

/*Add your CSS below!*/
.fancy {
    font-family: cursive;
    color: violet;
}

#serious {
    font-family: Courier;
    color: #8C8C8C;
}

body :nth-child(3) {
    font-size: 26px;
}

and it changes the font.

The error im getting is Oops, try again. Did you give your third paragraph a font-size of 26px? It looks like it's currently undefined.


#6

you should use :nth-child(4), but that only works if your html code is correct. Please post your html code, we seen your css code now


#8

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body class>
		<!--Add your HTML below!-->
		<h3 class="fancy">Hello world<h3>
		<p class="fancy">I love programming</p>
		<p id="serious">another paragraph</p>
		<p>heeeeeeeeee</p>
	</body>
</html>

#9

your h3 closing tag is missing the slash, messing up the count of your nth-child


#10

OH THAT WORKS :stuck_out_tongue: Im clumsy to overlook thins. THANK YOU!! :smiley:


#12

also what's the class for after body ?