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 Write Hexadecimal Colors

Alexander Fisher
Alexander Fisher
4,943 Points

Challenge task 4 of 4 Add hover to navigation links changing color to #32673f

I' having trouble figuring out why my code doesn't work:

p {
color: #000;
nav {
color: #fff;
nav a.hover {
color: #32673f;

3 Answers

Hi Alexander!

Your code for hover should look like this: nav a:hover { color: #32673f; }

"hover" is a pseudo-class just like we saw with the "nav a, nav a:visited" css rule.

To apply a pseudo-class you've to use the ":" just after the selector. In your case "a".

The correct code is therefore: ```css nav a:hover { color: #32673f; }

nav a.hover is a css selector that selects the anchor element inside the nav element with the class hover.