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 trial

CSS

Code Challenge 2 of 4 - Create a new rule that targets the 3rd list item only. Set the background color to the HEX value FF6347.

http://teamtreehouse.com/library/pseudoclasses-nthchild

As far as I can tell the code is ok here, it renders correctly within Google Chrome. However its not working in the code challenge. has anyone come across this?

challenge: Create a new rule that targets the 3rd list item only. Set the background color to the HEX value FF6347.

Response from The Test engine: Bummer! Check the selector in your CSS. Make sure you set background-color to #FF6347.

My code: li:nth-child(even){ color: white; background-color: black; }

li:nth-child(3){ color: white; background-color: ff6347; }

6 Answers

Hello! The # sign is missing from your hexadecimal color value.

If that solved your problem, please click Best Answer

-Steven

Are you still having trouble with this Nazaam?

Hi Steven,

My answer was accepted, adding the '#' worked out.

thanks for the help.

I can't seem to pass this one. Here is my code:

/* Write your CSS below */ li:nth-last-child(even) { color: white; background-color: black; }

li:nth-last-child(3) { background-color:#FF6347; }

Hi, try this, it seems to be one hyphen to many: li:nth-last-child(3)

Should be :

li:nth-child(3){ color: white; background-color: #ff6347; }

also look at color: & code it the way you see here. Let me know if this works for you...

none of those answers work : ( at all not even close!!

@al lenis - In addition to adding the # as stated above, be sure NOT to add a space in the nth-child selector. This will throw it off. examples:

li:nth-child(3) = Right li:nth-child (3) = Wrong

I don't have access to your code, but this could be the culprit.

-Cheers!

Also, don't forget that the challenge asked you to ADD a new rule; so don't delete the first task. Just add it below that one.

-Cheers!