jln19
jln19

Reputation: 43

CSS - Unwanted margin/padding at top of browser window

Please see this url: http://qwiet.com/index.html

Note the 20px or so at the top, above the pagewrap. I want the pagewrap div to be at the top of the browser and extend to the bottom. I've tried inspecting in Firefox, Chrome, and Safari and can't seem to find anything that is adding this margin.

Upvotes: 1

Views: 1062

Answers (2)

SeanCannon
SeanCannon

Reputation: 78006

You have some code in your body tag above the conditional comment - see all the dashes:

 <body>-----
        <!--[if lt IE 7]>

Delete those. Then you can give your body a margin:0 like Mike suggested and you should be set.

Upvotes: 3

Mike
Mike

Reputation: 1544

It looks like the default margin from the body tag. Appending this to your css should do the trick:

body { margin: 0px; }

Similarly, I'd recommend looking into css resets. There are some helpful resources on this in the book "Handcrafted CSS" by Dan Cederholm

Upvotes: 2

Related Questions