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 CSS Foundations Advanced Selectors Pseudo-Classes: :nth-child

Kelly Herring
Kelly Herring
1,606 Points

Issues with code challenge in 'advanced selectors' section.

When I finish up the first task of the code challenge (stage 3/advanced selectors), and moved to task 2 and click "Check Work", it keeps telling me the following:

Oops! It looks like Task 1 is no longer passing.


I've redone step #1 about four times now, which I get right, but when I do step #2, even though it is correct, I get that error. Is it a bug perhaps? Or am I not doing something right?

I've input the code below.

index.html
<!DOCTYPE html>
<html>
<head>
    <title>Structural Pseudo-classes</title>
    <link rel="stylesheet" type="text/css" href="cc1-main-style.css">
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
    <ul>
        <li>List item 1</li>
        <li>List item 2</li>
        <li>List item 3</li>
        <li>List item 4</li>
        <li>List item 5</li>
        <li>List item 6</li>
        <li>List item 7</li>
    </ul>
</body>
</html>
style.css
/* Write your CSS below */
li:nth-child(3) {
  background-color: #FF6347;
}

2 Answers

Andrew McCormick
Andrew McCormick
17,730 Points

looks like you erased the css you wrote for step one. be sure to leave

li:nth-child(even) {
  background-color: black;
  color: white;
}
Kelly Herring
Kelly Herring
1,606 Points

Ah! I see what I did now. Thanks!

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 11,075 Points

Did you delete the rule that you created in the first task? If so then that is your problem, remember the instructions asked you too create a new rule. So re add the rule from the first task and see if that works.

Kelly Herring
Kelly Herring
1,606 Points

Yep! Just realized that. Thanks for your help!