Review/23 Pseudo selectors isn't working

Hi everybody,
Although I accurately apply all necessary instructions, I encounter “Oops, try again. Did you give your third paragraph a font-size of 26px? It looks like it’s currently undefined.” warning. How can I overcome that problem?

Thank you.

Well, could we see your html and css code? It is the only way we can help you.

A post was split to a new topic: 23 psuedo selector

Hi, here ,is my code below. Many many thanks in advance.

HTML;

<!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">I've learnt how to use class selectors.</p>
	<p id="serious">ID selectors</p>	
	<p>Final Selectors</p>
	</body>
</html>

CSS:

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

#serious {
    font-family:Courier;
    color:#8C8C8C;
}
p:nth-child(3) {
    font-size:26px;
}
1 Like

nth-child count all elements, and if the 4th element is a paragraph, apply the styling, otherwise don’t. A better way to explain this, would be that p:first-child won’t do anything, since the first element is a h3, and not a paragraph.

So, if all elements are counted, it should be nth-child(4), make sense?

That would work, but you forgot the slash in your h3 closing tag, which messes up the count

Please read this post about markdown so your code/indent will show.

1 Like

Thank you so much my friend. I’ve just overcomed the problem.:wink:

1 Like

3 posts were split to a new topic: 23 pseudo selector

5 posts were split to a new topic: 23 psuedo selector

A post was merged into an existing topic: 23 pseudo selector

6 posts were split to a new topic: 23 pseudo selector

4 posts were split to a new topic: 23 pseudo selector