View Full Version : body background color won't fill browser window

07-24-2007, 05:45 PM
For some reason, my body background color declarations won't fill up the entire page if there isn't enough content to reach the bottom. I've noticed this on Firefox and Safari- but IE seems to work fine. Here is my current declaration:

padding: 0;
margin: 0;
color:#FFF ;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;


I've attempted to add dimensions like width:100%; and height:100%; however they don't seem to have any effect. Additionally I have tried almost every single doctype under the sun. And still, there is white space. Interestingly enough, when I resize the window- the color will fill the space.

To see an example: http://wholesystemsdesign.com

Has anyone else struggled with this issue?

07-24-2007, 06:04 PM
Can't say I have, and what is ever stranger is that when I hovered over the white block at the bottom with my color picker tool in FF it suddenly filled the gap!

Anyways, to sort the problem, you could just add the background colour to the HTML rather than the body, which I believe is only the height of the body in FF whereas IE wrongly stretches it to the window. The HTML is the only tag that should take up the spare space in the window.