I'm having a layout issue and i can't figure out how to fix it. My page has extra space on the right and bottom in the browser. How do i fix this so there's not much scrolling for users.
here's a link to view the page: http://www.btr-services.com/CDM3
code:
<script language = 'javascript'>
function redirect(URL) {
location = URL; }
function openpopup(popurl){
window.open(popurl,'','toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=400,height=200');
return false;
}
function getWindowHeight() {
var windowHeight = 0;
if (typeof(window.innerHeight) == 'number') {
windowHeight = window.innerHeight;
}
else {
if (document.documentElement && document.documentElement.clientHeight) {
windowHeight = document.documentElement.clientHeight;
}
else {
if (document.body && document.body.clientHeight) {
windowHeight = document.body.clientHeight;
}
}
}
return windowHeight;
}
function setFooter() {
if (document.getElementById) {
var windowHeight = getWindowHeight();
if (windowHeight > 0) {
var contentHeight = document.getElementById('main').offsetHeight;
var footerElement = document.getElementById('bottom');
var footerHeight = footerElement.offsetHeight;
if (windowHeight - (contentHeight + footerHeight) >= 0) {
footerElement.style.position = 'relative';
footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
}
else {
footerElement.style.position = 'static';
}
}
}
}
window.onload = function() {
setFooter();
}
window.onresize = function() {
setFooter();
}
</script>