function alertSize() { var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } return myHeight; } // CODE MAAKT CONTENT_LEFT EN CONTENT RIGHT NET ZO LANG ALS DE CONTAINER // // dh is de hoogte van de content // Op laatste regel wordt de content_left even lang gemaakt als content_right, de correctie kan per site verschillen // Variabelen die per site moeten worden aangepast: dh - xxx, correctie = xxx, calculated + xxx . function fixH(hContainer, cl,cr) { //Hoogte van het scherm height = alertSize(); //Fix voor de hoogte van Content right, kan per site verschillen content = dh - 40; //Dit is ongeveer de hoogte van het menu, footer etc.. Per site verschillend correctie = 275; //De berekende hoogte van de container, afhankelijk van scherm hoogte. var calculated = (height - correctie); //Kijken of de berekende hoogte, te klein is voor content.. zoja, wijzig de berekende hoogte if(calculated < content) { calculated = content } //hoogte wijzigen document.getElementById(cr).style.height = calculated + 'px'; document.getElementById(cl).style.height = (calculated + 10) + 'px'; } window.onload = function() { fixH('container','content_left','content_right'); } window.onresize = function() { fixH('container','content_left','content_right'); }