PDA

View Full Version : DIv Attributes


N_R_D
02-03-2006, 08:08 PM
How can I get this to work??

divHolder = document.getElementById("left")
biggun = divHolder.offsetHeight
document.getElementById('columnHolder').height = biggun

left is the id of a DIV, so is columnHolder.

All I want is to get the height of left so i can use that to change the height of columnHolder.

N_R_D
02-03-2006, 08:18 PM
is

document.getElementById('columnHolder').style.height = biggun

the best way?

i just found that on the net ...

seems to work.

coothead
02-03-2006, 10:38 PM
document.getElementById('columnHolder').style.height = biggun

It might be a little safer to use....

document.getElementById('columnHolder').style.height = biggun+'px';

...especially for Firefox.

coothead

N_R_D
02-04-2006, 12:35 AM
Beautiful !!!

Good looking out.