This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by piettejd2000
almost 9 years

23/23 I'm stumped on this CSS code for nth-child - set font to 26px

Here’s the relevant HTML

    <body>
    <h3 class="fancy">Blah Blah Blah </h>
     <p class="fancy">Blabbidy Blah</p>
     <p id="serious">Bling Bling</p>
     <p> problem child</p>
    </body>
</html>

Here’s the CSS

.fancy {
  font-family: cursive;
  color: violet;
}
#serious {
    font-family: Courier;
    color: #8C8C8C;
}
body :nth-child(4) {
    font-size: 26px;
}

Answer 5571c1f99376768cd2000514

4 votes

Permalink

None of the above solutions is right! The problem lies with the target of your nth-child rule. You’re supposed to target the CHILD not the parent. The code you posted would make the

points
Submitted by Randy Williams
almost 9 years

4 comments

LittleBrumbyDesign147 almost 9 years

Perfect it worked straight away :)

Robbie Powell almost 9 years

No you are wrong, they haven’t closed the h3 tag properly

Blah Blah Blah they have missed the 3 inside the closing tag.

slra22 almost 9 years

so I originally did ‘p:nth-child(4)’ and it worked but then the HINT box suggested ‘body :nth-child(4)’. I’m assuming it can be both in this case but not in others?

Todd almost 9 years

Wow! IT WORKED! Thank you so much, I really appreciate it. :)

Answer 556e112ee39efef1c300011d

1 vote

Permalink

change your

color:violet;

into

color:Violet;

points
Submitted by Leon
almost 9 years

Answer 556e129176b8fe9f5400027e

0 votes

Permalink

Sincere thanks. The problem seems to be that it’s not reading/applying my nth-child format correctly.

points
Submitted by piettejd2000
almost 9 years

1 comments

Judy almost 9 years

It looks like this is the source of your problem:

Answer 556f9841e39efe35ec00020b

0 votes

Permalink

I believe you are suppose to close your H3 tag like this: </h3> I think it is wrong to just close your header tag like:</h>

points
Submitted by nguyenisonfire
almost 9 years