Well, you can use the onresize event for the page to determine when to make adjustments to any individual element on a page.
clientHeight is IE specific and must be used as either document.body.clientHeight or document.documentElement.clientHeight if the inner height of the browser window is desired, the alternative used by other modern browsers is:
window.innerHeight
This function helps to determine how to know whether to use body or documentElement in IE:
Code:
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
So you could do something like so, with the above function available:
Code:
onresize=function(){
var docy=window.innerHeight? window.innerHeight : iecompattest().clientHeight;
div3.style.height=docy-div1.offsetHeight-div2.offsetHeight+'px';
}
But, you could end up with zero or a negative number.
Bookmarks