Also dies ist eine bastelei.
Ich würde mir grundsätzlich was anderes überlegen.
<html>
<head>
<title></title>
<script type='text/javascript'>
window.onresize = setDimension;
function setDimension(){
var yWindow = getScreenHeight()-20;
var yContent = getContentHeight();
var yFueller = yWindow - yContent;
document.getElementById("fueller").style.height = yFueller + "px;";
}
function getScreenHeight(){
// all except Explorer
if (self.innerHeight) return self.innerHeight;
// Explorer 6 Strict Mode
else if (document.documentElement && document.documentElement.clientHeight) return document.documentElement.clientHeight;
// other Explorers
else if (document.body) return document.body.clientHeight;
}
function getContentHeight(){
var test = document.getElementById("content");
var test1 = test.scrollHeight;
var test2 = test.offsetHeight
// all but Explorer Mac
if (test1 > test2) return test.scrollHeight;
// Explorer Mac
else return test.offsetHeight;
}
</script>
</head>
<body style='margin-top:10px; margin-bottom:10px;' onload='setDimension();'>
<div id='content'>
<div style='border-bottom:1px solid black;'>Hier das Menu</div>
<div style='margin-top:20px;'>Hier der Inhalt der Webseite<br />Hier der Inhalt der Webseite</div>
</div>
<div id='fueller' style='background-color:red;'>
</div>
</body>
</html>