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.

Adam Yuen
Courses Plus Student 1,043 PointsNext, target the li that is the last child of the ul. Set its border to none.
challenge 2/2 Next, target the li that is the last child of the ul. Set its border to none.
li:last-child{ border: none; }
this isnt working
8 Answers
John Steer-Fowler
Courses Plus Student 11,734 PointsHi Adam,
I think this is the correct answer off the top of my head. I think this syntax say's target <li>
that is the last child of the <ul>
li:last-child ul {
border: none;
}
Hope this helps, but it might be wrong

Adam Yuen
Courses Plus Student 1,043 PointsHey John,
I just tried the line but unfortunately no success. Still trying to figure out this problem.
John Steer-Fowler
Courses Plus Student 11,734 PointsFor future, you can make a forum post directly from the Code Challenge you are stuck on. Then people can have a go on the same challenge to help find an answer :D

Joseph Wasden
20,406 PointsAre there any attributes (such as a class) assigned to the li that you could use to target the element? Try the below, if possible.
```li[class="theclass"]:last-child { border: none; }

Adam Yuen
Courses Plus Student 1,043 Pointsno classes linked to it.

Adam Yuen
Courses Plus Student 1,043 Points@john, thanks I just reposted the problem again.

Joseph Wasden
20,406 PointsTry this
ul li:last-child{border:none}

Joseph Wasden
20,406 PointsI just retried the challenge and the above code worked for me. Hope that helps.

Adam Yuen
Courses Plus Student 1,043 Pointsit says Oops! It looks like Task 1 is no longer passing.
my code so far ul li:last-child{ color:white; background:black; border:none; }

Adam Yuen
Courses Plus Student 1,043 PointsJoseph Wasden - I tried that earlier and just tried it again. no bueno(no good)

Joseph Wasden
20,406 PointsHmmm...
Sorry it wasn't a help. I'm very curious what the problem could be.
to be clear, you should have two rules in the CSS at this point, both the first-child and the last-child. can you copy and paste the full CSS from your challenge here?

Daniel Muvdi
5,262 Pointsthe problem is not your code, the problem is that you cant delete the code from the first task.