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 trialThomas Offutt
343 PointsI am trying to apply a different color to the nav element in the header, but it won't change color.
I typed the same code which was given, only slightly changing the actual color.
6 Answers
Sage Elliott
30,003 PointsThe portion of the CSS you posted looks correct to me. It's possible there could be an error somewhere else in the code. I will often forget a semicolon or bracket somewhere that can mess up the rest of the code. I've also forgotten to save the file before...haha.
Thomas Offutt
343 PointsWell, I did realize that I had placed the class="selected" in the wrong part of the html, but it doesn't seem to have changed anything.
Thomas Offutt
343 PointsWait.....
Thomas Offutt
343 PointsI noticed a single missing bracket that wasn't allowing any code after it to apply. Thanks for the help!
Sage Elliott
30,003 PointsWould you mind posting the code so we could take a look and see what happened?
Thomas Offutt
343 PointsThe same thing just happened with another bit of code, and I noticed that the text is blue instead of black.
Sage Elliott
30,003 PointsLooks like you may have a typo in your pseudo class tag. You have "nag" instead of "nav". Try fixing that and see if it works.
Thomas Offutt
343 PointsWoops, that was just autocorrect in the comment. I have "nav a" in the actual code.
Sage Elliott
30,003 PointsAnytime! Debugging is just part of the process and can definitely be frustrating, especially at the beginning! We all make those mistakes and you'll quickly learn the common ones.
Thomas Offutt
343 PointsThomas Offutt
343 Pointsnav a, nav a:visited {color: #fff0ff;}