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 trial

CSS

Why my Pseudoclass isn't working?

I'm following everything that they say to do, and it's not working.

My snapshot https://w.trhou.se/g4focpclaa

What is the problem. I see a lot of spaces, try this one and let me now.

a {
  text-decoration:none;
}

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

#logo{
  text-align:center;
  margin: 0;
}

a {
  color: #6ab47b;
}

header {
  background: #6ab47b;
  border-color: #599a68;
}

h1, h2{
  color: #fff;
}

nav {
  background: #599a68;
}

nav a, nav a:visited {
  color: #fff;
}

nav a.selected, nav a:hover {
  color: #32673f;
}

1 Answer

You have a typo.

    nav a.selected, nav a: hover {

You want:

    nav a.selected, nav a:hover {

Not positive, but I think the error in that line will cause the browser to ignore it.

Thank you, I didn't know that a little space could make such problem.

If that's your first encounter with a little space causing issues, get ready for A LOT more, lol! Extra spaces, other characters, and misspellings can truly be a pain in the behind when it comes to finding and squashing bugs in web development! :)

Happy coding!