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.

CSS How to Make a Website Customizing Colors and Fonts Write Hexadecimal Colors

Hover problem

This is probably an obvious one ... :)

I need to add a hover state for navigation links that changes the text color to the value #32673f Why is my answer incorrect?

nav a: hover { color: #32673f; }

Thanks for your help. Nick

Kieran Gibbons
Kieran Gibbons
17,434 Points

Try removing the space between a: and hover.

2 Answers

rydavim
rydavim
18,798 Points

The hover part is :hover, so does it work if you remove the space between the a: and hover?

EDIT - to clarify, the colon ( : ) is 'attached' to the hover selector, not the element you're applying it to.

nav a:hover { color: #32673f; }

Yes. That worked! I thought spaces didn't matter in html and CSS. Guess I was wrong. Thanks for your help.