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 trialAshot Hakobyan
452 PointsWhy 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
36,695 PointsHi 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:
<nav>
<ul>
<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>
</ul>
</nav>
Ashot Hakobyan
452 PointsAshot Hakobyan
452 PointsHey Adam, thank you so much. Up to now I was unable to detect the problem. You did me a great favor, thank you!!!