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 How to Make a Website CSS: Cascading Style Sheets Take a Mobile-First Approach

What the max-width and margin are?

I dont understand clearly what did the max-width and margin change?I changed the values of my max-width and margin and didn't noticed any changes.

1 Answer

David Jarrin
PLUS
David Jarrin
Courses Plus Student 11,182 Points

So the margin is the space between elements, say if you have links in your navigation bar, if the margin:0 then they will be right next to each other and if you set it to 15px, they will have 15px of separation (this link explains the box model pretty well http://www.w3schools.com/css/css_boxmodel.asp). Max-width is the maximum width the element will stretch, you can see this when you set it to the max-width to a paragraph, if you set the max-width to a shorter width the paragraph will have to wrap several times but if you have a longer max-width it wont have to wrap as much (change the max-width property and see what happens http://www.w3schools.com/cssref/tryit.asp?filename=trycss_dim_max-width)