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.

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,109 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