Prøv og rod lidt med den her:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org[...]
<html>
<head>
<title>Fuld højde m. iframe</title>
<meta name="keywords" content="roenving,
http://www.eksperten.dk[...]
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
html,body{height:100%;margin:0px;border:0px;padding:0px;}
#top{position:relative;height:120px;background-color:#789;}
#main{position:relative;height:300px;background-color:#559;overflow:hidden;}
#bottom{position:relative;height:120px;background-color:#789;}
#mainiframe{height:100%;width:100%;overflow:auto;}
</style>
<script language="javascript" type="text/javascript">
var exDivs = ['top','bottom'];//id på elementer, som skal fratrækkes for at finde main-divens højde
var minH = 300;//main-divens mindste højde
var ie = (document.all)?true:false;
function sizeDiv(){
var bH = (window.innerHeight)?window.innerHeight:document.body.offsetHeight;
var exH = 0;
for(i=0;exDivs.length>i;i++){
exH += document.getElementById(exDivs[i]).offsetHeight;
}
nyH = Math.max(minH,bH-exH);
document.getElementById('main').style.height = nyH + 'px';
ifr = document.getElementById('mainiframe');
if(ifr)ifr.style.height = nyH + 'px';
}
</script>
</head>
<body onresize="if(!ie){sizeDiv();}else{location.reload(true);}" onload="sizeDiv();">
<div id="top">Top-div</div>
<div id="main">
<iframe src="iframe.html" id="mainiframe" name="mainiframe"></iframe>
</div>
<div id="bottom">Bottom-div</div>
</body>
</html>
--
Nyt Community - http://www.pcfreek.dk[...]
Portfolio - http://www.web-grafik.dk[...]