Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Customizing Colors and Fonts Write Hexadecimal Colors

eunjee yang
eunjee yang
1,434 Points

I don't understand what it means of setting the color of anchor elements inside the nav element to white?

There is quiz to set the color of anchor elements inside the nav elements to white. I looked at the preview, the links of nav has gone, once I set nav. I don't get it. and I don't get the concept of anchor exactly.

css/main.css
a {
  text-decoration: none;
}

h1, h2 {
  color: #fff;
}

p {
  color: #000;
}

nav {
  background-color: #fff;
  color: #1363d2;
}

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

#logo {
  text-align: center;
  margin: 0;
}
Stephen Ambler
Stephen Ambler
8,224 Points

nav a { color: white; }

you are targeting something that is inside of the nav.

2 Answers

Russell Sawyer
seal-mask
.a{fill-rule:evenodd;}techdegree
Russell Sawyer
Front End Web Development Techdegree Student 15,705 Points
<nav> // <=== This is the nav element
  <a></a>  // <=== This is the anchor element inside the nav element
</nav>

So your CSS should start like this. You will need to review the videos to figure out the rest

nav a {}

Hi,

to change color for anchor element inside nav you need to target:

nav a { color: #fff; }

But don't forget to change the background color on nav because it's set to white at the moment and the anchor elements won't be visible.