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 trialAmon Dow III
4,086 PointsMy css code isnt working the hover property is not working for some reason
I am making a website. I am following his steps however when I enter the hover components it not working on my code here my code
a{
text-decoration:none;
}
#wrapper{
max-width: 940px;
margin:0 auto;
padding:0 5%;
background:green;
}
#logo{
text-align:center;
margin:0;
}
a{
color:#6ab47b;
}
header{
background:#6ab47b;
border-color:#599a68;
}
h1,h2{
color:#fff;
}
nav{
background:#599A68;
}
nav a{
color:#fff;
}
}
nav a: visited {
color:#fff;
}
nav a .selected, nav a: hover{
color:blue;
}
Iain Simmons
Treehouse Moderator 32,305 PointsHi Amon Dow III, I've edited your question to properly format the code.
You had the backticks, but they need to be on their own line and with a blank line before the first set and after the last set. You can also specify the particular type of code your highlighting.
For example:
Your normal text
```css
a {
text-decoration: none;
}
```
More normal text
Amon Dow III
4,086 Pointsthere should be no space after nav a: and hover this should solve it
nav a .selected, nav a:hover{ color:blue; }
2 Answers
Trevor Austin
8,153 PointsHey Amon, Not sure if it because of the way it was copy-pasted, but I noted a space" between a: and hover. Instead of a: hover, try a:hover (no spaces)
-Trevor
Amon Dow III
4,086 Pointsthanks Simmons
Amon Dow III
4,086 PointsAmon Dow III
4,086 Pointsthanks Austin