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

I dont understand the meaning of ul.nav li {}

Can somebody explain me that step by step

5 Answers

Ok. "ul" is the unordered list. The ".nav "part is referring to the name of a class, and the last part "li" refers to the list items of that list. In summary, the statement ul.nav li is targeting all the list items inside the unordered list that has the .nav class applied.

Kevin Korte
Kevin Korte
28,148 Points

We are selecting all list-items, inside of an unordered list with the class of nav.

Thank you so much!

By any chance someone know how to put comments next to each code line?

Colin Marshall
Colin Marshall
32,861 Points

In CSS you put comments between these: /* Comment goes inside */ You can use multiple lines too.

and also in HTML?

Scott Paterson
Scott Paterson
26,869 Points

<!-- comment in here --> for HTML Simon