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 How to Make a Website Styling Web Pages and Navigation Build Navigation with Unordered Lists

How do I remove extra white border at top of page to match the instructor's page?

In following the exercise, my page is left with a border at the top of the page. However, I cannot figure out why. I want to make sure I haven't done anything wrong, or how I can fix it.

3 Answers

Jesus Mendoza
Jesus Mendoza
23,289 Points

See if

* { margin: 0; padding: 0;}

Fixes it

No, this did not seem to make a difference, but it got me looking. I found that I made a mistake typing in the following:

# gallery {
margin 0;
padding 0;
list-style: none;
}

As you can see, I'm missing the colons for margin and padding. Adding them, fixed it. Thanks!

Did you apply the appropriate styles to the header?

header{
float: left;
margin:  0 0 30px 0;
padding: 5px 0 0 0;
width: 100%;
}

Yes, this was added correctly.

I found that I made a mistake typing in the following:

# gallery {
margin 0;
padding 0;
list-style: none;
}

As you can see, I'm missing the colons for margin and padding. Adding them, fixed it. Thanks!