Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBrandon Battles
3,315 PointsStructural Pseudo-classes Task 2
"Create a new rule that selects the 3rd list item only. Set the background color to the HEX value FF6347."
Code shows
li:nth-child(3){ background-color:FF6347; }
Error shows 'check the selector in your CSS'. I'm asking for the 3rd list item, or at least that's what it appears as to me, can someone help guide me in the right direction?
1 Answer
Chase Lee
29,275 PointsYou have to put a hash before your color value like this:
li:nth-child(3){ background-color: #FF6347; }
Hope that helps.
Brandon Battles
3,315 PointsBrandon Battles
3,315 PointsThanks Chase! I could not figure it out, being that it had the selector message. I just kept looking at the code dumbfounded.
Chase Lee
29,275 PointsChase Lee
29,275 PointsNormally you don't want to listen to the hints in the code changelle, because they almos never point to the right thing!
Brandon Battles
3,315 PointsBrandon Battles
3,315 PointsI'll keep that in mind, thank you for your help!
Chase Lee
29,275 PointsChase Lee
29,275 PointsNo problem.