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

HTML How to Make a Website Responsive Web Design and Testing Adjust the Profile Page and Header

Josh Jones
Josh Jones
2,894 Points

My "About" and "Contact" pages do not have any white space between the colored heading and the body.

I think I may need to add padding or margin, but not sure where to do this. Help, please?

Snapshot: http://w.trhou.se/k08x0z1b9p

3 Answers

Erik Nuber
Erik Nuber
20,629 Points

You are getting some really bizarre behavior on your site.

You should be able to choose the wrapper ID and, give it a margin top of some amount to give it space but, it adds the white space above the header even though the wrapper doesn't include the header.

In reverse I tried targeting the header and giving it a margin bottom but it does nothing.

The only way I can fix it is by changing the padding within the wrapper ID to 15-20% however much space you would like to see.

Erik Nuber
Erik Nuber
20,629 Points

Just to note as I'm still playing with it, you need to change your class="selected" on the about.html to the correct <li> tag

Erik Nuber
Erik Nuber
20,629 Points

I have been fiddling around and, it seems that most of the problem is because you declared your header a float when it isn't actually floating. This should fix it.

header {
/*  float: left;*/
  display: block;
  margin 0 auto 50px;
  padding: 25px;
  width: 100%;
  height: 175px;

}