I'm trying to reduce the space between the page content and the footer..this is the code i'm using to resize and the method call is implemneted in master page pageload()

Code:
function resize() {
    var windowHeight;
    if (document.getElementById("leftnav") && document.getElementById("content")) {
//         document.getElementById('leftnav').style.height = document.getElementById('content').offsetHeight - 20 + 'px';
        if (document.getElementById("content").offsetHeight >= 698) {
                        document.getElementById("leftnav").style.height = document.body.clientHeight + "px";
                        document.getElementById("content").style.height = document.body.clientHeight + "px";
       }
    }
This method resizes based on the content but it gives more extra space between the content and the footer which is not our site standards. Any suggestions please?
thanks