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 Basics (2014) Basic Layout box-sizing and max-width

Ryan B.
Ryan B.
3,236 Points

Box Sizing

For whatever reason I'm not sure exactly what the "box sizing" property entails. Can someone, in a few sentences, tell me what the take away of this video is? Sometimes hearing it explained in someone else's words can be all the difference. Thank You!

2 Answers

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hi Ryan Bilello,

Hopefully this article on box-sizing and the CSS box model helps answer most of your questions. :)

A box, or element is actually four components. Content, Padding, Border, and Margin. The default setting is to evaluate the element by the content, so the basically the box sizing property in CSS allows you to evaluate the element including it's perimeter properties as well. I think w3schools has a good explanation of this property and usage of its values.