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 CSS: Cascading Style Sheets Center the Wrapper

Diego Andrade
Diego Andrade
1,158 Points

I honestly did not understand the difrent value of the margin can somebody please explain this in a difrent manner pleas

Just looking for a diffrent way of looking at it please help

the box model?

2 Answers

Steven Parker
Steven Parker
231,198 Points

Margin is just spacing around an element. You can specify margin separately for top, right, bottom, or left, or you can combine them into one margin property.

You can specify a quantity and unit (like "20px") for a specific size, or "auto" for centering.

Does that help?

Diego Andrade
Diego Andrade
1,158 Points

yes thank you very much c:

When applying padding to an element it is adding space within the content box (refer to the box model). When applying margin to an element space is added outside of the element to give separation between neighboring elements.