Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

garrycohen
13,914 PointsPseudo-Classes – :nth-child - bug in challenge?
It will not let me pass on task 2 of 4 for this challenge - task 1 passed fine, task 2 asks "Create a new rule that targets the 3rd list item only. Set the background color to the HEX value FF6347."
So i add my css rule (which adds to the previous tasks rule)
li:nth-child(even) {
color: white;
background-color:black;
}
li:nthchild(3) {
background-color: #ff6347;
}
Any idea on how to get past it?
Thanks
2 Answers

Darren Kynaston
Courses Plus Student 15,610 PointsHi Garry,
You have simply missed typed the nth-child (you've missed the dash)
li:nth-child(3) { background-color: #ff6347; }
should work.
Kind Regards,
Darren.

garrycohen
13,914 PointsWow - I'm such a fool!
how did I not notice that?!
Cheers
Darren Kynaston
Courses Plus Student 15,610 PointsDarren Kynaston
Courses Plus Student 15,610 PointsHi Garry,
You have simply missed typed the nth-child (you've missed the dash)
li:nth-child(3) { background-color: #ff6347; }
should work.
Kind Regards,
Darren.