05-08-2008, 09:56 PM
|
#8 (permalink)
|
|
The Addict
Join Date: Nov 2007
Location: the Netherlands
Posts: 224
Thanks: 2
|
I fix the problem like this in my websites:
Code:
// Vergroot div's hoogte wanneer een andere div hoger is
function changeDiv() {
// Div's hoogte's
var contentDiv = document.getElementById('mainContent');
var contentHeight = document.getElementById('mainContent').offsetHeight;
var browserWindow = document.documentElement;
var menuDiv = document.getElementById('menu');
// Client window
var clientWindowHeight = browserWindow.clientHeight - 130;
// Grootste hoogte?
var size = Math.max(clientWindowHeight, contentHeight);
// Set height
//contentDiv.style.height = size+'px';
//menuDiv.style.height = size+'px';
}
window.onload = changeDiv;
window.onresize = changeDiv;
Should be pretty simple even while the comment is in dutch (since im dutch)
The place where you see -130, is my height of the header. I design my sites like this:
- overall wrapper with optional BG
- header
- col 1
- col 2
- close wrapper
If you choose to use my code and dont get it, don't hestitate mailing me (jim at combined-minds.net)
|
|
|