Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.