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)
![SERGIO RODRIGUEZ](https://uploads.teamtreehouse.com/production/profile-photos/1828302/micro_1506085_10153666625700293_1527702041_o.jpg)
SERGIO RODRIGUEZ
17,532 Pointsgrid-container class in header element
In Stage 5 of the CSS Layout course Guil inserts a new "div" inside the "header" element to set it as a grid-container class. Why can't we just use the "header" for that purpose?
2 Answers
![tobart](https://secure.gravatar.com/avatar/a4393c38e075c150f783f2bd27b230c0?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
tobart
13,518 PointsWe want to span the header the full browser width. At the end of the chapter we define a maximum width for our grid-container, thus makes it span just that amount of pixels. Inserting the new div ensures that only the content within will be set to the max-width, while the header spans the full width of the browser window.
![Bianca Negron](https://uploads.teamtreehouse.com/production/profile-photos/419622/micro_photo5.jpg)
Bianca Negron
9,486 PointsCould be because the header element should fill 100% of the screens width, whereas the grid-container will always have a smaller set width for different screen sizes.
Joshua Holland
2,865 PointsJoshua Holland
2,865 Points"Why can't we just use the ____ for that purpose?" If you posted code in there, it removed it.