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
Shafeeq Ahmed
6,058 PointsWhite 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
Lukas Muller
7,347 PointsDid you forget to remove the margin of the body or heading?
Lukas Muller
7,347 PointsYou're welcome! A "best" rating would be nice (:
Shafeeq Ahmed
6,058 Pointsafter i changed the top padding to 5px it was fixed.
Cecilia Khiew
12,431 PointsIf 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/
Shafeeq Ahmed
6,058 PointsTHank u Ceclia
Shafeeq Ahmed
6,058 PointsShafeeq Ahmed
6,058 Pointsafter I make the changes below. margin: 0 0 30px 0; padding: 5px 0 0 0;
now it is Okay.
Thanks you lucas