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 How to Make a Website Customizing Colors and Fonts Use Classes in CSS

Why a.selected is not enough?

<li><a href = "index.html" class = "selected">Portofilo</a></li>

a.selected{ color: black; } I tried to change the anchor which belongs to class of selected, but it did not work. I think that a.selected is enough to reach that anchor. Doesnt the "a.selected" mean that anchors that belongs to selected class?

Damien Watson
Damien Watson
27,419 Points

Yes this is the case. Can you please show how it is being used (HTML).

2 Answers

If u can post your code I would be happy to look at it for u and see what's going wrong

Ryan Field
PLUS
Ryan Field
Courses Plus Student 21,242 Points

You're correct; a.selected would be targeting a tag that looks like: <a class="selected" href="...">. Can you give any more details how it's not working? What exactly are you trying to do?