On my page I have two DIVs, "main" and "footer":
<div id="main"> stuff... </div>
<div id="footer"> stuff... </div>
I aligned <div id="footer">
to the bottom of the page this way:
#footer {
position: fixed;
width:100%;
bottom:0;
}
What's the best way to make <div id="main">
take up all the space from top of page to top of <div id="footer">
?
For the special case where the window is so small that <div id="footer">
takes up the entire page space, <div id="main">
can be moved off the page entirely, or be aligned at the top of the page, I don't care as long as it doesn't break anything.
Edit: Is it possible to do this using CSS only ?
I can't set the height of the "footer" to a fixed value, it must be determined by the browser based on its content.