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
Michael Mountain
3,022 Pointsspace above header
Hi, i am in the process of styling my contact page and I can't figure out why when i add any content to the section part of the contact page i get a white space above the header.... delete the section and it goes away.. my about page hass exactly the same code with 1 section and it works no problem.
any tips?
7 Answers
Diane Houghton
5,773 PointsBe sure your section div comes after the heading closing tag
Diane Houghton
5,773 PointsIf that doesn't work you'll have to post your code so we can see what's going on
Devin Gray
39,261 PointsYou say the contact page has the exact same layout of the about page except the about page works fine? I'd say importing the css from the about page instead of copying and pasting the same code in another css file could help. But I can't really say anything until I see code.
Jason Anello
Courses Plus Student 94,610 PointsIf you're working on "How to Make a Website" then you probably have a float clearing problem. If the first thing that you add in your section has a top margin then it will produce a corresponding gap above your header.
To fix this you should clear the floated header in your wrapper element.
#wrapper {
clear: both;
}
Add the clear property to the already existing wrapper rule.
If you're working on something else, then post code or link to a live preview if you can.
Michael Mountain
3,022 Pointsok the clear:both worked. :) not sure how to do a live preview?
Jason Anello
Courses Plus Student 94,610 PointsGlad you got it working. No need to do the live preview. I had only requested it if you were working on something else.
What I meant though was that you could give us the url of your project if you had it live somewhere. Either on workspaces or if you uploaded it to some web hosting. Then we would be able to look at it.
Michael Mountain
3,022 Pointsoh ok :) thanks for your help :)
Michael Mountain
3,022 Pointsoh ok :) thanks for your help :)