Question

I don't have this problem in Firefox or Opera Presto but in Chrome on a page that doesn't have the height specified the body takes up 100% of the window height at all times. So basically this means that if the body content fits in less of the window height there will be space remaining there.

Is there a way to inhibit this behavior and make it collapse relative to the amount of content in the body like it does in the other browsers?

The css body rules are:

body {
 width     :840px;
 margin    :7px auto;
 background:#f8f8f8;
 border    :1px solid #888;

}

Was it helpful?

Solution

You can set the body to float to achieve this effect.

body {
   float:left;
}

Edit: I see you're using the body as a container element. Maybe it's better if you put all your stuff into a container div and don't style the body at all?

OTHER TIPS

I've noticed that on some pages, like that 404 one, Chrome applies display:flex; to the body by default. You can give this a try:

body{
    display:block;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top