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

Sage Savage
seal-mask
.a{fill-rule:evenodd;}techdegree
Sage Savage
Front End Web Development Techdegree Student 3,960 Points

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#

Edward Rosario
Edward Rosario
534 Points

Have you tried body { margin:0; }

Edward Rosario
Edward Rosario
534 Points

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

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

2 Answers

Francisco Osegueda
Francisco Osegueda
11,114 Points

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