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

HTML How to Make a Website Styling Web Pages and Navigation Build Navigation with Unordered Lists

Just wanna know why it doesn't work if I put the display property inside the nav ul selector? Why it has 2 be in nav li?

Hi, I still can't figure out why I just can't include or declare the "display:" property in the nav ul selector? Why did Nick have to declare it under the selector nav li? I tried it and what happened is that Portfolio, About, and Contact links are on top of each other, like how it was before. They are not side by side. Is it not that the nav ul is the same as nav li?

1 Answer

Steven Parker
Steven Parker
231,275 Points

The list (ul) is the container of the list items (li). The display property of the container only affects how the entire list interacts with other elements. For the items to appear side-by-side, their own display property must be changed.

Thank you. Got it.