I'm not looking for a Sticky Footer solution here. What I want is for the footer, the final containing div, to extend to the bottom of the browser window.
Here's the code. If I have to use Javascript, that's fine. This doesn't have to be a pure CSS solution.
oh, in that case you're going to have to apply a height to the footer using a percentage like 50% or however much you want. Then make the rest of the page have the remaining height.
Thanks again, but I don't believe that works. At least not with the code I provided. Are you able to accomplish that using the code I provided? Can you show me an example?
Remove that padding value. Or you could use a percentage value instead and subtract that value from the footer's height. For example padding-bottom: 3% and height: 17%
I don't think that's going to work for me, since I can't have the main_content div be a fixed height. It needs to expand to contain the content within.
Question: Are you looking for the footer to be at the bottom of the window if the content doesn't fill window? Does this mean if the content extends past the bottom of the window you want the footer not to be visible unless you scroll down?
body,html{
height:100%;}
#outerbox{
width:100%;
position:absolute; /* to place it somewhere on the screen */
top:130px; /* free space at top */
bottom:0px;} /* makes it lock to the bottom */
#innerbox{
width:100%;
position:absolute;
min-height:100%; !important /* browser fill */
height:auto;} /*content fill */
Bookmarks