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 CSS Foundations Text, Fonts, and Lists List Styles

need to add a bottom-margin of 20px for list items

list styles code challenge #3 keeps coming up wrong. I need to add a bottom-margin of 20px to list items. Here is what I put.

li{ bottom-margin: 20px; }

3 Answers

John Steer-Fowler
PLUS
John Steer-Fowler
Courses Plus Student 11,734 Points

Hi :D

It's confusing, I know. But a lot of the time with CSS the syntax is not exactly how it seems it should be written.

In this case, you are adding a bottom margin of 20px. This seems as though the syntax would be bottom-margin but it is in fact margin-bottom

This is because you are adding a margin, where are you adding it? To the bottom, hence the order this code takes

You will find this is the case with a lot of CSS

Hope this helps

idan ben yair
idan ben yair
10,288 Points

Hi kayclarke, can you post the exact question?

idan ben yair
idan ben yair
10,288 Points

Yup John is right I totally over looked that lol. Good job!