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 Why Vertical Margins Collapse

Header and Footer collapsing?

I am working on my responsive design project and I want to get rid of the space around the top and sides of the header and footer. I tried what the video suggests but it didn't seem to work. Hoping some one could point me in the right direction. Thanks! Here's the link to my workspace - https://teamtreehouse.com/workspaces/25246662#

Have you tried body { margin:0; }

or try removing the padding/margins from the body tag.

body{ padding:0px; margin:0px; }

2 Answers

Thanks for your response, I tried that and it fixed the white space on the sides but not the top.

The default margin and/or padding of the <h1>, <p> or <ul> elements might need to be remove.