Simon
Simon

Reputation: 29

<body> bigger than what it should be

The <body>, <html>,... and other elements are normally sized at 385px (as it should be) but the content area is bigger though.

I don't understand where the problem comes from...

https://dl.dropbox.com/u/9487343/2012-06-16%2019.09.00.jpg

Box model respected: https://dl.dropbox.com/u/9487343/2012-06-16%2019.31.09.jpg

Upvotes: 0

Views: 8405

Answers (2)

twaddington
twaddington

Reputation: 11645

You should read up on the CSS box model. From your brief description, I suspect it's due to some padding you've added to your body, or one of the child elements. You might try setting the following CSS in your document:

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

Upvotes: 4

Steeven
Steeven

Reputation: 4200

Remember that any height or width does NOT include paddings, margins and border widths. And large content could push a box wider than what is was set for.

Upvotes: 0

Related Questions