I tried it on my own for so long, and all the messages that I read and sorted so far have not helped me, so I hope one of you guys can give me a hint:
I have a layout consisting of a header, footer and content. This layout is stretched across the page in height (it took me some time to understand). So far, so good. But now I want to stretch the content-div as far as possible, right up to the start of the footer. No matter what I do, it does not work, it either saves the length of the text in it, or becomes the size of the whole window, hiding the footer and creating a scroll bar. I read about the solution by making it position:absolute , but I don't want that.
Here is an example: http://jsfiddle.net/N9Gjf/1/
You really help me!
Here is the css:
html, body { height:100%; text-align:center; } #wrapper { min-height:100%; height:100% overflow: hidden; width:800px; margin: 0 auto; text-align: left; background-color:lightblue; } #footer { background-color: silver; height:1.5em; width:800px; margin: -1.5em auto; } #header { background-color: orange; height:100px; } #content { background-color: limegreen; } * { margin:0; padding:0; }
And here is the html:
<div id="wrapper"> <div id="header"> <p>Header</p> </div> <div id="content"> INHALT </div> </div> <div id="footer"> <p>Footer</p> </div>
source share