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 trialRasmus Boll
4,371 PointsHelp for "how to make a website" challenge task 4 of 4
Hi there,
my challenge is to make a hover state, so when the mouse hoveover, the link should get an other color, than it normal has ( I know that it should be easy ) but some how, I can´t figure out, what it is that i´am doing 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:hover {
color: #fff;
color: #32673f;
}
1 Answer
Steven Parker
231,236 PointsIt looks like you combined tasks 3 and 4.
The rule you create for task 4 should be in addition to the one you created for task 3. But it looks like you modified the task 3 rule, evidenced by the fact that you still have the original color property from task 3 in the new rule along with the one for task 4. Having 2 of the same property in a CSS rule is always a clue something is wrong, only the last one will be effective.
Put things back the way they were for task 3, then add task 4 as a separate new rule.
Rasmus Boll
4,371 PointsRasmus Boll
4,371 PointsI had already try that once, but it did´t work, BUT after reading your answer, I thought that I had to give it another shoot.
I discovered that the way I had written the code before was just like this:
nav a { color: #fff;
nav a:hover { color: #32673f; }
Insted of like this:
nav a { color:#fff; } nav a:hover { color:#32673f; }
What I´am trying to say is, THANK you for your help Steven :)
Steven Parker
231,236 PointsSteven Parker
231,236 PointsYes, leaving off that closing brace would cause a syntax error. Glad I could help, and happy coding!