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
Anika Kazi
Courses Plus Student 552 PointsMy pages are not being selected when I click on them. ex: about page is not remaining selected when I am on that page.
<nav> <ul> <li><a href="index.html" >Portfolio</a></li> <li><a href="about.html" class="selected">About</a></li> <li><a href="contact.html">Contact</a> </li> </ul>
2 Answers
Steven Parker
243,656 PointsPerhaps you have some CSS or JavaScript that you use with this HTML code that is changing things?
This might be a good time to make a snapshot of your workspace and post the link to it here.
Jeremy Hill
29,567 PointsI found this info for you; you probably need to add these features in your css:
The :hover selector is used to select elements when you mouse over them.
Tip: Use the :link selector to style links to unvisited pages, the :visited selector to style links to visited pages, and the :active selector to style the active link.
Note: :hover MUST come after :link and :visited (if they are present) in the CSS definition, in order to be effective!
example:
a :hover{
color: cyan;
}