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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Yoghanand Gabriel](https://uploads.teamtreehouse.com/production/profile-photos/670902/micro_mypic_200px.jpg)
Yoghanand Gabriel
4,240 Pointsmax-width and padding
In stage 4 of "How to make a website" i.e CSS: Cascading Style Sheets,
Nick writes a css code
wrapper {
max-width: 940px;
margin: 0 auto;
padding: 0 5%;
}
and explains the property "max-width: 940px" that, we want the width to be no larger than 940 pixels across, then how come when we add the padding property to be "padding: 0 5%;" the max-width goes larger than 940px, then whats the purpose of "max-width" ??
2 Answers
![Geert-Jan Hendriks](https://uploads.teamtreehouse.com/production/profile-photos/589482/micro_gj1.jpg)
Geert-Jan Hendriks
23,126 PointsThe max-width is the width of the content area. So te padding wil be added, but the width of the content area wil never be wider than 940px
![Yoghanand Gabriel](https://uploads.teamtreehouse.com/production/profile-photos/670902/micro_mypic_200px.jpg)
Yoghanand Gabriel
4,240 PointsOk got it, Thanks.