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

White space around header

I am trying to make the portfolio (from the course how to make a web site) page by my self. I am currently customizing the "header". I set the "width" and "max-width" to "100%". but there is white space around my "header". I even linked the "normalize.css". Even though I kept seeing some white space on the top. Please help me fix this.

3 Answers

Did you forget to remove the margin of the body or heading?

after I make the changes below. margin: 0 0 30px 0; padding: 5px 0 0 0;

now it is Okay.

Thanks you lucas

You're welcome! A "best" rating would be nice (:

after i changed the top padding to 5px it was fixed.

If you are using h1 element inside the header, try setting the margin-top to 0.

h1 { margin-top: 0; }

Maybe this might help.. http://www.sitepoint.com/web-foundations/collapsing-margins/

THank u Ceclia