Page 1 of 1

Making a div span the rest of the page

Posted: 30 Nov 2011, 11:19
by DarkRanger
Me again! :lol: :lol:

Anyhow, I want a div to span the rest of the page. I have a header which is x height, a menu which is y height and then I want the div to be screenheight - x - y. At the moment my code looks like this:

Code: Select all

<body style="margin:0 0 0 0; background:#222; font-family:'Century Gothic'; height:100%">
	<div style="position:absolute; top:0px; left:0px; display:block; width:100%; height:100%" align="center" id="body">
    	<div style="display:block; width:1000px; height:100%" id="page">
            <div style="display:block; background:green; width:75px; height:550px; float:left; position:fixed; top:0px; background:url(images/pme.png) no-repeat center;" id="leftbanner">
            </div>
        	<div style="display:block; background:#222; width:100%; height:125px; background:url(images/header.png) no-repeat center;" id="header">
            </div>
            <div id="menu-container">
		<!-- Styled in CSS file -->
            </div>
        	<div style="display:block; background:#EFEFEF; width:100%; text-align:justify" id="content">
            	<div style="margin:0px 10px 0px 10px; padding:20px; height:100%">
		</div>
            </div>
        </div>
    </div>
</body>
It doesn't work if I put height:100% in the content div.