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 trialCatriona Bohan
Courses Plus Student 5,053 Pointshow do I , add a hover state for navigation links that changes the text color to the value #32673f.
I'm doing a code challenge at the moment and one of the question is to Add a hover state for navigation links that changes the text color to the value #32673f. Which I have done but it seems to be incorrect. Anyone know what I have done wrong?
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, nav a:hover {
color: #32673f;
}
2 Answers
edeharrison
Full Stack JavaScript Techdegree Student 11,127 PointsHi Catriona,
By placing a comma between two elements, like so:
nav a, nav a:hover {
color: #32673f;
}
it means you are selecting both the nav a in the normal state, and the nav a in the hover state.
You need to make a separate style to just target the a:hover, like so:
nav a:hover {
color: #32673f;
}
Hope that helps,
Ede
Catriona Bohan
Courses Plus Student 5,053 PointsPerfect Ede, that work a treat. Thanks a million.