This forum is now read-only. Please use our new forums! Go to forums
banner
Close banner
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
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
Answer 556e112ee39efef1c300011d
Answer 556e129176b8fe9f5400027e
0 votes
Sincere thanks. The problem seems to be that it’s not reading/applying my nth-child format correctly.
1 comments
Judy almost 9 years
It looks like this is the source of your problem:
Answer 556f9841e39efe35ec00020b
0 votes
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>
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
4 comments
Perfect it worked straight away :)
No you are wrong, they haven’t closed the h3 tag properly
Blah Blah Blah they have missed the 3 inside the closing tag.
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?
Wow! IT WORKED! Thank you so much, I really appreciate it. :)