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

Aligning website with top of page?

Hello,

I am trying to align my website with the very top of the browser. I believe the browser's stylesheet margin is pushing it down by 8px. I have tried correcting it using

html, body {
     margin: 0;
     padding: 0;
}

But I haven't gotten anywhere.

I am also using normalize.css.

My site can be found here: http://trvor.com

Thank you in advance!

1 Answer

Jeff Lemay
Jeff Lemay
14,266 Points

There is margin-top on the h1 inside your header. One solution is:

#logo h1 { margin-top:0; }