View Full Version : Simple problem, having div fill entire page

06-27-2007, 02:41 AM

Instead of just white space at the bottom I wanted to put a color. However I can not get it to be the correct size. When the content fills the entire screen the div will be 1px but other than that it just goes to the bottom.

Hope you get that.

edit:// I will put this div background to red for demo sake.

double edit:// working on the search box, never really use these and I can not get the search button to line up with the search box.

06-27-2007, 03:20 AM
#bottomextraspace {
height: 45px;
width: 100%;
background: #5a6063;
font-size: 1px;
seems to do what you want atleast in FF2

06-27-2007, 03:29 AM
What if I need more or less than 45px?

That is the problem, thanks for the reply though!

If there is a better way than doing this please share.

07-01-2007, 08:26 PM
If there is a better way than doing this please share.
Why not just give e.g. your body element some background-color other than white. Wouldn't that do the job?

07-08-2007, 05:04 AM

If I change the body background to blue then the content background would be blue

edit:// putting body background to blue to show you.

07-08-2007, 12:17 PM
I wanted you to remove this too:

<div id="bottomextraspace">
If you want some extra space at the bottom then why insert markup? Could you not just use something like this:

body {
margin-bottom: 100px;

07-09-2007, 07:32 AM
I see where you are going with this but it does not work. What about the content?

07-12-2007, 03:59 AM
Got It!