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.

HTML How to Make a Website Customizing Colors and Fonts Organize CSS with Comments

Ashot Hakobyan
Ashot Hakobyan
452 Points

Why my selected anchor doesn't change its color when it is in a state of being selected?

Hello friends, can anyone indicate on my mistake because I can't find the problem why it is still white. I select Portfolio but it is still white, not green as it is in the video. Thanks a lot for your time. P.S. Below are my html and css codes.



1 Answer

Adam Sumner
Adam Sumner
36,695 Points

Hi Ashot,

Your CSS shows that the link text should display green both on on hover and if the class 'selected' is apply to it.

Therefore for the home page your navigation should look like this:

    <li><a class="selected" href="index.html">Portfolio</a></li>
    <li><a href="about.html">About</a></li>
    <li><a href="contact.html">Contact</a></li>
Ashot Hakobyan
Ashot Hakobyan
452 Points

Hey Adam, thank you so much. Up to now I was unable to detect the problem. You did me a great favor, thank you!!!