![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
17/07/2009, 21:19
|
| | Fecha de Ingreso: julio-2009
Mensajes: 32
Antigüedad: 15 años, 7 meses Puntos: 0 | |
optener el tamaño de un div que no tiene tamaño fijo hola tengo el sgte codigo
<div id="Central" STYLE="position:absolute;height:500">
</div>
function altura(){
var div1 = document.getElementById('Central');
var div2 = document.getElementById('Pie');
div2.style.top = div1.style.height;
}
con esta funcion altura obtengo sin problemas el heigth=500 y se lo paso a otro div
pero mi problema es el sgte:
<div id="Central" STYLE="position:absolute;">
</div>
function altura(){
var div1 = document.getElementById('Central');
var div2 = document.getElementById('Pie');
div2.style.top = div1.style.height;
}
no tengo el height definido ya que quiero que el div cresca a medida que le aumento elementos y la funcion ya no me devuelve el tamañp que crecio |