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 trialCharles Ng
4,444 PointsI thought only the "Portfolio" would turn dark green when hover. Why is it turned dark green already?
nav a.selected , nav a:hover { color: #32673f; } It is working as per your video showing. I just want to understand more. I thought only the "Portfolio" would turn dark green when hover. Why is it turned green permanently? "About" and "Contact" would turn green when the mouse hover over the text, as per your video.
I tried: nav a, nav a:hover { color: #32673f; }
Deleted the class "selected". "Portfolio" became white and turned green when hovered over. "About" and "Contact" turned green permanently.
Any explanation would be appreciated, thanks.
1 Answer
Cody Garrett
2,103 PointsThe class "selected" sets the text of that class to dark green, so it will allow the user to easily know what page they are on. It is meant to make that dark green. That is why when you deleted it, it no longer was this way.
As for the reason on the other two turning dark green permanently after you removed that class, I can't say without seeing your code.