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 trialDiego Andrade
1,158 PointsI 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
2 Answers
Steven Parker
231,269 PointsMargin 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
1,158 Pointsyes thank you very much c:
Benjamin Hedgepeth
5,672 PointsWhen 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.
Matthew Garza
26,312 PointsMatthew Garza
26,312 Pointsthe box model?