I have a javascript function on my website that is triggered onLoad in the body:
function adjustDivSize()
{
d = document.getElementById('background');
document.getElementById("backgroundImg").style.height = window.innerHeight+"px";
imgWidth = document.getElementById("backgroundImg").width;
marginLeft = ($(window).width() - imgWidth)/2;
d.style.width = imgWidth+"px";
d.style.left = marginLeft+"px";
document.getElementById("backgroundImg").style.visibility="visible";
document.getElementById("menu").style.visibility="visible";
}
This function sets the height of an element to match the browser page height. It works well in most browsers, except for IE7 and IE8 where it doesn't load properly. Do you have any suggestions for a solution?
Thank you