Something is not right in 23: 3rd paragraph code gets rejected no matter what I try


#1

I've tried everything I can think of, from cutting/pasting "correct" code (taken from a reply to someone else who was having difficulty with this, to changing other values with the final paragraph.

I finally tried changing the "nth-child(4)" value to "nth-child(3)" the change worked (as you can see from the screen shot). However (as you can see from the screenshot), even though IT WORKED, the code was rejected. Any idea why this is happening?


#2

took a break came back to it and figured out what the problem was. Code accepted!!!


#3

You figured out your h3 closing tag was missing a slash and you needed to use body :nth-child(4)? Do you understand nth-child now?


#4

Same exact thing, emmatank what did you figure out??


#5

Let me know what you changed if you don't mind


#6

did you read my answer? emmatanks h3 closing was a missing a slash and it is body :nth-child(4) (third paragraph is 4th element) if you need any further help, post your code


#7

I fixed it before I got any replies at all, which was why I posted:


#8

apparently, you didn't see that. But thank you for getting back to me.


#9

I figured you figured it out, i was just curious what the mistake was. And then @mrlexmiller came with a new question, so now i am going to help him, if he is willing to post his code


#10

:grinning: I went back and did a line-by-line to make sure everything that was opened had been closed and found it. Sorry I did't think to post it after I had done that!


#11

What i'm doing wrong? By how written in the hint, it's doesn't works....


#12


#13
h3 p:nth-child(3)

Your actual selector won't work, as you aren't giving even a * selector.


#14

explain, please.

My selector works. You can see it at the right window. But! button below wont' accept it.


#15

Yeah, because the lesson is telling you to select the third paragraph child element, not the third child element. Codeacedemy is very strict in that way.

Also, you are getting those paragraphs inside the h3 when they are siblings of it (brothers). So you sould do something like body p:nth-of-type(3) or body *:nth-child(4).


#16

@arccoder77254, h3 p:nth-child(3) doesn't sound like a good idea.

@ogionfrost, yes, your output but looks good, but a few problems: you can never nest a paragraph in a heading (h3 in this case) or vice versa. So your html code needs to be changed:

<h3>headings</h3>
<p>paragraph</p>
<!-- rest of the code -->

which means you also need to change your css selector, but i think you can figure that out. If you need any further help, let me know


#17

Yeah, I understood that. But, interpreter of codecademy doesn't want allow both of these variants.

http://joxi.ru/n2Yad9eUMOPW26


#18

because you shoulld nest paragraphs in headings, and SCT expect you to use nth-child(4)


#19

http://joxi.ru/DmBLJBlI0QLDAP

Ok. Thanx. I understood my mistake of wrong placed closing tag of h3.
Now body :nth-child(4) works.
But still interpreted doesn't accept that.


#20

@stetim94 Yeah, I know, but sometimes Codecademy don't like good ideas as you are telling me, so if they say to use it with a space, use it with a space.