I ended up using some simple browser detection. I found out that IE supports offsetHeight, so here is what I came up with:
Code:
function rockBody(){
var buddyH = document.getElementById('content');
var buddy = buddyH.offsetHeight+200;
if (navigator.userAgent.indexOf('MSIE') !=-1){
document.getElementsByTagName('html')[0].style.height="100%";
document.getElementsByTagName('body')[0].style.height="100%";
var torso = document.getElementsByTagName('body')[0].offsetHeight;
var buddy = buddy+50;
}
else{
var torso = window.innerHeight;
}
if(buddy <= torso){
buddyH.style.height = torso-325+"px";}
}
window.onload=rockBody;
Seems to work. Thanks!
Thou com'st in such a questionable shape
Hamlet, Act 1, Scene 4
Bookmarks