Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,274 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!