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

CSS CSS Layout Basics Getting Started with CSS Layout Creating a Layout Wrapper

brandonlind2
brandonlind2
7,823 Points

I don't understand the reason for having a layout wrapper

What is reason for having a layout wrapper, what purpose does wrapping all your page content serve?

4 Answers

Tobiasz Gala
seal-mask
.a{fill-rule:evenodd;}techdegree
Tobiasz Gala
Full Stack JavaScript Techdegree Student 23,529 Points

It depends on what kind of layout you want to create. Usually, wrapping everything is a good practice because you can limit content size. Think about it like you have to create website for different sizes and thanks to wrapper you put your desired size inside those screens.

Owa Aquino
Owa Aquino
19,277 Points

Wrapper limits the width of your website contents so it will not look bad on bigger screen sizes/resolution.

Yeah most professional websites use the wrapper to hold the layout of the page , with a div.

Chris Conwell
Chris Conwell
2,268 Points

From what I can tell it purpose is to create white space on the side of the page, which could be used for links, ads, or aside.