Getting error for nth child task

What i’m trying to accomplish:

HTML:

<body>
        <h3 class="fancy">Head3<h3>
        <p class="fancy">paragraph</p>
        <p id="serious">para2</p>
        <p>Brianna</p>
	</body>

CSS:

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

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

Why am I getting this error message, is there something wrong with my code?
Thanks for the help in advance :smile:

Hey @brianna_vaykeas_com! Its the pargraph your suppose to set it. So codecademy dosent know what to set to 26px.

So instead of this(whitch is not defined ) :

Do this:

body  p:nth-child(4) {

Thanks @amanuel2 - this causes the desired effect to the 3rd paragraph, but i’m still getting the error message that will not let me save and move on. I suspect this may be a bug… :frowning:

screen shot your window. Will you?

Oh Sorry! I forgot put it as the fourth element not the third since its one more. This will surely solve your problem

unfortunately, everything i have tried is resulting in the same . My code clearly works because the font size is indeed increasing on the preview page, not sure why i can’t save and submit code

Type in 4 and take a screen shot.(sorry im making you take a lot of screenshots). But i need a Mod to look at this so they can fix it or identify your problems

Mod Calling(not to you): @albionsrefuge @mtf @zystvan @jacobsandersen @leonhard_wettengmx_n

No problem, I appreciate your help!

Try body:nth-child(4). From the instructions, that seems to be what the grader is hinting at.

This is because p has no children. p itself is a child, but it is not a parent of anything but the text.

same result:

Ok, my bad.

Try this:
p:nth-child(3) { font-size: 26px; } (spacing as necessary)

but ALSO, go to your browser’s zoom settings to make sure they aren’t zoomed in. To quickly see if you’re zoomed it, press the key combination ctrl+0 to reset to 100%. An incorrect zoom can cause a grading glitch.

confirmed my browser is set to 100%

still unable to save

That h3 element needs a / in its closing tag.

2 Likes

@albionsrefuge That fixed it!
Thank you!!!

1 Like

2 posts were split to a new topic: I have a problem with the nth term