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.

JavaScript CSS Selectors Quickstart Pseudo-classes and Combinators Pseudo-classes Challenge

Melbourne Hauk
seal-mask
.a{fill-rule:evenodd;}techdegree
Melbourne Hauk
Full Stack JavaScript Techdegree Student 2,286 Points

Bug in the answer processing for task 3?

So after completing tasks 1 and 2 of the Code Challenge, adding the third task results in the second task being flagged as incorrect with an error message of "did you set the last-child to azure?", which I did. Am I actually doing something wrong, or is this just a bug?

/* Complete the challenge by writing CSS below */
li:first-child {
  color: white;
}

li:last-child {
  color: azure;
}

li:nth-child(even) {
  color: dodgerblue;
}
Melbourne Hauk
seal-mask
.a{fill-rule:evenodd;}techdegree
Melbourne Hauk
Full Stack JavaScript Techdegree Student 2,286 Points

So I believe the error is occurring because the nth-child(even) is causing the last item to become dodgerblue. I attempted to switch their order in the code, and now the dodgerblue task will not register as correct because the last-child: azure is now changing the color of one the even items.

1 Answer

The instructions for task 3 are to set the background color not the color

Melbourne Hauk
seal-mask
.a{fill-rule:evenodd;}techdegree
Melbourne Hauk
Full Stack JavaScript Techdegree Student 2,286 Points

Thank you for the response, I actually noticed this right after posting my comment, haha. Crazy how far 1 small thing overlooked can take you down the rabbit hole.