Making a div span the rest of the page

Get help on web editors (Frontpage, Dreamweaver) and web languages (HTML, ASP, PHP).
Post Reply
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Making a div span the rest of the page

Post 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.
Image
Post Reply