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 trialChris Beyer
969 PointsCSS link color Styling within an NAV
I am in the CSS part of how to build a website. I have never been so stumped and I have done work with CSS in the past. The question asks to style a link the color white within an NAV. I put Nav a{color:#fff;}. It says it is wrong. Although I got it right last night and seemed to have lost the work. I don't know what else to try. Actually my goal is really to get to Ruby on rails. I thought I just need a review of CSS as I haven't worked with it in a while. Please help otherwise I will not be able to progress to Rails.
2 Answers
Steven Parker
231,261 PointsSince you didn't provide a link to the challenge, this is a bit of a guess.
The challenges can be a bit picky so if they asked for "white", I would spell out the color just as they did instead of using the number equivalent. And I would avoid upper case in the selector. Based on how you quoted the challenge, I would submit this:
nav a { color: white; }
Trevor Woodman
Courses Plus Student 13,354 PointsIn order to really help we would need your HTML so we can see exactly what you're trying to style.
If you just have a <nav>
element and you're trying to style any <a>
tags inside of it, and the <a>
tags aren't inside of a list or anything (so you don't have to worry about specificity):
nav a {
color: #fff;
}
Looks like you were writing nav with a capital N? That could have been your issue. But again, HTML is needed.