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.

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,021 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!