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.

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

Bee Priola
Bee Priola
3,922 Points

#hover html I'm trying to add hover on nav a. I don't know what I made mistake.

a { text-decoration: none; }

wrapper {

max-width: 940px; margin: 0 auto; }

logo {

text-align: center; margin: 0; } h1, h2 { color: #fff; } p{ color:#000; } nav a{ color:#fff; } nav a: hover{ color: #32673f; }

css/main.css
a {
  text-decoration: none;
}

#wrapper {
  max-width: 940px;
  margin: 0 auto;
}

#logo {
  text-align: center;
  margin: 0;
}
h1, h2 {
color: #fff;
}
p{
color:#000;
}
nav a{
color:#fff;
}
nav a: hover{
  color: #32673f;
}

1 Answer

You have to place the hover directly next the the colon without any spacing. Try "nav a:hover {". Also, just for future reference, it's a good idea to space all of your code evenly. For example, above the hover selector, you have "nav a{". Instead, write "nav a {" for cleaning code. Hope that helps!

Bee Priola
Bee Priola
3,922 Points

Ash

Thank you for your advice, it's work :)