Review/23 Pseudo selectors isn't working


#1

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.


#2

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


#3

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


#4

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;
}

#5

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.


#6

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


#7

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


#10

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


#12

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


#17

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


#23

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


#27