Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
#holder, #head, #content {
width:750px;
}
#content {
overflow:auto;
border:1px solid black;
}
</style>
<script type="text/javascript">
function resize(){
document.getElementById('content').style.height = 500 - document.getElementById('head').offsetHeight + 'px';
}
function pollH(){
if (document.getElementById('head').offsetHeight!==hh){
hh=document.getElementById('head').offsetHeight;
resize();
}
}
function onload_function(){
resize();
hh=document.getElementById('head').offsetHeight;
setInterval("pollH()", 60);
}
if ( typeof window.addEventListener != "undefined" ){
var hh;
window.addEventListener( "load", onload_function, false );
}
else
onload=function(){resize();document.getElementById('head').onresize=resize;}
</script>
</head>
<body>
<div id="holder">
<div id="head">
head
</div>
<div id="content">
content
</div>
</div>
</body>
</html>
Bookmarks