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 How to Make a Website CSS: Cascading Style Sheets Use ID Selectors

Joseph Longo
Joseph Longo
1,074 Points

The header is not contained in wrapper. Why not?

I noticed that the header is not contained within the div. Why not? I reviewed the code from another person's website template and they did the same thing. Why? Is it not semantic to contain it within the wrapper ID? In the website I am building, I want everything to be contained within a 960px wrapper. Should I include my header within the 960px wrapper or should I leave it outside of the wrapper and style the header 960px also---independent from wrapper?

1 Answer

Jacob Miller
Jacob Miller
12,466 Points

I think the primary reason most people don't put the header in the wrapper is because they want the header to span the full width of the page while making the rest of the site a certain width. And I kind of think of the header, content, and footer as three separate sections, so it makes sense to me to keep all your content in a wrapper while leaving out the header and footer.

That being said, it's perfectly fine to put the header inside a wrapper if that's what you want.