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


max-width and box-sizing

Hello All,

I want to thank you for taking time to read my post. So i am in the CSS basics track. I am just trying to make sure i am understanding correctly.

With box-sizing it is used to make sure you are allocating the exact amount of pixels for your height and width instead of adding the amount of your padding, border, and margins? To avoid having to subtract from the total amount of space it is taking up?

Also, max-width is used to make sure that the content does not go over the amount that you set, it is a fixed value so you do not go over that so on wider screens it looks the same?

Thanks, JC

1 Answer

Dane Parchment
Dane Parchment
Treehouse Moderator 11,075 Points

Correct, it seems like you have grasped the concepts!