Salve, volevo creare uno script che permetta a due div di avere la stessa altezza.. Il primo ha come id "center" , il secondo "menu", però a menu vanno aggiunti 30px oltre all' altezza di text, avevo provato così in un foglio js:
poi l' ho richiamato tramite:Codice PHP:
funcion height_uguale() {
var men = document.getElementById('menu');
var text = document.getElementById('center');
var text_height = text.style.height;
men.style.height = ""+text_height+"+30";
}
Ma non funge.. come devo mettere?Codice PHP:
<body onload="height_uguale();">