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

Problem with advanced selectors first code challenge

When ever I try to complete the second question in the first code challenge of the advanced selectors section of the CSS foundations course, I get told that “Oops! It looks like Task 1 is no longer passing.” This is the code I enter below, I am pretty sure it's correct.

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

Can anyone tell me what the problem is? Is it my code, problems with the site or my computer?

2 Answers

Hey Daniel, couple things to check.

  1. Make sure the answer to the first question is still the same format: li:nth-child(even) { color: white; background-color: black;}
  2. Make sure the answer to the second question only solves the problem that's being asked. In this case, it's only asking for you to make the background-color #FF6347.

Let me know if that helps!

Yup, I do the first question correctly and just change nth-child(even) to nth-child(3) and background-color: black to background-color:# FF6347

I do have an old laptop (5years) but i have done tons of code challenges so far without any problem. the challenge doesnt tell me i've done it wrong, it just doesnt seem to have finished processing the last answer, even though it said that it was correct

Remember to keep your first answer in place and add your second answer below it. For example, your style.css file might look like this:

li:nth-child(even) { color: white; background-color: black; }
li:nth-child(3) { background-color: #FF6347 }

Ah that was it. Thanks Scott, a silly mistake but one that stumped me. Cheers dude