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
Richard Targett
4,960 PointsWhere in the archives will I find information on setting up and styling a UL
Back a while ago for me in the tracks I remember there being specific explenations on list items and setting up styles to an un/ordered list.
Im making a nav bar and would like to know where I can find all the great information on UL styles, how to set them up, etc.
Thanks
1 Answer
Samuel Glister
12,471 PointsHi Richard,
The below part of CSS foundations may be able to help out!
https://teamtreehouse.com/library/css-foundations/text-fonts-and-lists/list-styles-2
Failing that here are some simple styles for an UL
HTML:
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#about">About</a></li>
</ul>
CSS:
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
li {
float: left;
}
li a {
display: block;
padding: 8px;
}
You can then build on this with more styling by adding things like adding background colors, margin to seperate the different links and much more!
Happy coding.