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 How to Make a Website CSS: Cascading Style Sheets Center the Wrapper

Bob Sutherton
Bob Sutherton
20,160 Points

Max-width

I didn't fully get the explanation about "max-width". I got that the width of the div is not supposed to exceed 940px, as the name implies, but that's about it. What am I missing here? I feel there was more to it that I didn't grasp.

2 Answers

Logan R
Logan R
22,989 Points

Max-width means that the width can be any width as long as it doesn't exceed the set width. If your browser is 500px and your max width is 700, the browser will adjust the width to 500px.

If you have a set width, width, then no matter what your browser size is, it will always be that width.

Hope this helps!