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 How to Make a Website Styling Web Pages and Navigation Create a Horizontal List of Links

Stephen Link
Stephen Link
3,685 Points

How do I find the nav element?

The challenge problem states, "Select the unordered list nested inside the nav element." Then I am supposed to make adjustments to the margins. I had thought that the element in question was nav a { color: #fff; } but when I add my margin commands to that element the grader is telling me that I still need make the margin changes. Is this not the nav element? If not then how would I find it?

2 Answers

Stephen Link
Stephen Link
3,685 Points

The confusion for me is that as the problem reads I was expecting to find the particular nav element already in the code. I thought that I would find it and then modify it as per the directions. A Google search led me to someone else who had the same confusion about this that I had. The answer for that person, and for me, was that the nav element needed to be created before it was modified. Once I did that it was smooth sailing. I think that the instructions should be modified to indicate that you need to create your own element instead of implying that you are selecting a pre-existing element.

It's asking you to select the unordered list. "a" is an HTML link element that you may or may not want to style. I think the exercise wants you to select the list, though, not the links inside the list. Try:

nav ul{ margin: ?? }