Problem at 23.Pseudo selectors


#1

Hello, I am also having this problem. It says…

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


Here is my code in text form

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body>
		<h3 class="fancy">class selectors<h3>
		    <p class="fancy">test</p>
		    <p id="serious">test</p>
		    <p>26</p>
	    </h3>
	</body>
</html>


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

Problem at 23.Pseudo selectors (Review)
#2
<body>
	<h3 class="fancy">class selectors<h3>
		 <p class="fancy">test</p>
		 <p id="serious">test</p>
		 <p>26</p>
	</h3>
</body>

<h3 class="fancy">class selectors<h3>
In this line you open 2 headers, but you eventually only close one.


#3

That was the reason why it wasn't working. Thanks!


#4

And after you applied @seemmetor suggestions (which is good), change p:nth-child(3) into p:nth-child(4), nth-child counts all elements and if the 4th element is a paragraph, apply the styling between the curly brackets. A better way to explain this, would be to say the styling between the curly brackets doesn't get applied of you use p:first-child because the first child is a h3, not a p. So, no match, so styling between curly brackets not applied.

curly brackets = {}


#5

i'm getting a similar error on the same exercise, but not for the same reasons, could you take a look at my most recent topic? it just does not seem to work


#6