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

I see a list item (li) following the #gallery tag, but nothing with the nav element. Where can I look to find a clue?

"Select the unordered list inside of the nav element. Remove the margins on the top and bottom..." [from Challenge Task on CSS -- How to Build a Website]

I see a list item (li) following the #gallery tag, but nothing with the nav element. And it throws me even further that they want Y margin metrics...

I assume that the stated relationship ("nested inside") refers to the structure of the HTML document, but this question provides only a CSS visual.

Where can I look to find a clue?

4 Answers

you have to create another nav element in your css. it is already there for handling links

nav a { color: #fff; }

nav a:hover { color: #32673f; }

so now create one for the UL

nav ul {

}

So we have to generate this supposed "nav element" preemptively?? OK...

The verb "select" strongly implies that (sought object) already exists. A sculptor does not select his sculpture; he creates it.

Does this word ("select") just assume a convenient new definition when placed in the context of a "markup selector"? (Pardon my pedantic sass -- frustrated.)

Anyway, if that is the answer I was seeking, thank you for clarifying, Eric.

(Though I still feel that this challenge prompt is fatally unclear and needs to be rewritten. Seriously.)

TJ Egan
TJ Egan
14,420 Points

nav ul does exist, in the HTML. You are selecting that HTML element in the CSS. They are expecting you to be able to create a new CSS selector to target that HTML element.

In order to SELECT the unordered list, you must CREATE a new SELECTOR.

TJ Egan
TJ Egan
14,420 Points

The 'Nav' element may just be the unordered list in the navigation area, used to contain the 'Portfolio', 'About', and 'Contact' pages. Is there a header HTML element?

"In order to SELECT the unordered list, you must CREATE a new SELECTOR." -- TJ Egan

Strong and fair logic. I stand down. Point taken.

TJ Egan
TJ Egan
14,420 Points

It's confusing at first, but you'll get the hang of it. Your CSS will never create new elements, but it will create new selectors for those elements.

I edited my question to include original challenge prompt: "Select the unordered list inside of the nav element. Remove the margins on the top and bottom..." [from Challenge Task on CSS -- How to Build a Website]

I am certain that the challenge pertains to the HTML structure (as you also seem to suggest, TJ), but as far as I can see, there is no way to toggle between the style sheet view and the HTML editor. This item seems as though it was written to be cryptic...?

TJ Egan
TJ Egan
14,420 Points

try this

nav ul {

}

Is there a way to select index.html towards the top of the editor?