23. Not Working!


#1
<!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"> Header </h3>
            <p class="fancy"> fancy </p>
            <p id="serious"> serious </p>
            <p> 4 Child </p>
    
	</body>
</html>

CSS

.fancy {
    font-family: cursive;
    color: violet;
}

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


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

#2

The nth-child(4) is not working!


#3

You need a space between body and :nth-child(4) to select the 4th element inside body, without the space, it will check if the 4th element is a body, well, it is not, it is a paragraph


#4

Thank You!
This space thing is not well written in the Hint section.


#5

not? This is from the hint:

Make sure to leave a space between body :nth-child. If you don't have a space it means "find the body tag that is an nth-child". If you have a space it means "find the nth-child of the body tag


#6

Still not working!

I fixed making

p{
font-size:26px;
}


#7


#8

sometimes not perfect code passes the exercise, like your code. It is still not good, did you read my answer? your spacing around the colon is wrong


#9

Yes, I did

I just want to find an answer about what's going on.

Thanks again for your soon reply


#10

You figured it out ?


#11

No.

I can go to the next lesson cheating the web site making the p tag has 26px font-size.

But, that's not an correct way to fix the problem.

I try it in mozilla and Chrome with the same bad browser's behavior.


#12

Like i already said:
You need a space between body and :nth-child(4)
your space is between body: and nth-child(4), which is the wrong place


#13

I have the same problem and I wrote it as it's said, with space between body and :nth-child(4) but it's not working.


#14

Could you also post (aka, copy and paste, no image) your html code? This css code only works if your html is correct as well


#15

I checked it. I had a mistake in h3 closing tag. Thank you for the answer.


#16

Thank you so much for mentioning the closing tag! As much as I looked at the p openings and closings missed that h. Thanks again as this is the problem. Now I can move on. Thanks.


#17

Thaks a lot sir from core of my heart


#18

You're welcome, i'm so glad it help you


#19

I have a couple problems with #23 pseudo selectors.
1. I keep getting some variation of error message: "Oops, try again. Did you give your third paragraph a font-size of 26px? It looks like it's currently 19px." (the 19px is new it's been undefined for hours.
2. I've repeatedly swapped the body_: & body:_ & p:_ & p_: etc. to no avail. A coupe variations will give the correct display but neither of them are what the hint suggests and neither will let me proceed.
3. The hint says the CSS should read "body :nth-child(4) {font-size: 26px;}" that does NOT give the correct display. nth-child(3) gives the correct display nth-child(4) does NOT and neither will let me move on.

Paragraph number four

is relatively new. I've done many many variation with both configurations.

Code:

<!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">This a header</h>
    		<p class="fancy">Paragraph number one</p>
	    	<p id="serious">Another paragraph</p>
		    <p>This is the 3rd paragraph</p>
		    <p>Paragraph number four</p>
	</body>
</html>

CSS:

/*Add your CSS below!*/
.fancy {font-family: cursive; color: violet;}
#serious {font-family: Courier; color: #8C8C8C;}
body :nth-child(3) {font-size: 26px;}

#20