M
marco_giuliani_it
I am changing the height of a div element and it works fine in ie, ff,
ns but when I add the div border style to "border:1px inset Black" it
doesn't change the height. border:solid works but I want more control.
Ay answers?
Cheers
Marco
function animateHeightDown(id, size)
{
el = document.getElementById(id);
var h_size1 = el.offsetHeight;
var w_size1 = el.offsetWidth;
alert("h = " + h_size1 + " w = "+w_size1);
if (w_size1 > 115)
{
el.style.width = w_size1 - 2+"px";
}
if (h_size1 > size)
{
el.style.height = h_size1 - 2+"px";
var newh = el.style.height;
alert("changing height to " + (h_size1 - 2) + "px");
alert("it is now " + newh);
setTimeout("animateHeightDown('" + id + "','" + size + "')", 1000);
} else {
if (ns6) {
document.getElementById("dwindowcontent").style.height = "1px";
}
}
}
loop one output is
h= 303 w= 165
changing height to 301px
it is now 301px
loop two output is
h= 303 w= 165
changing height to 301px
it is now 301px
etc
ns but when I add the div border style to "border:1px inset Black" it
doesn't change the height. border:solid works but I want more control.
Ay answers?
Cheers
Marco
function animateHeightDown(id, size)
{
el = document.getElementById(id);
var h_size1 = el.offsetHeight;
var w_size1 = el.offsetWidth;
alert("h = " + h_size1 + " w = "+w_size1);
if (w_size1 > 115)
{
el.style.width = w_size1 - 2+"px";
}
if (h_size1 > size)
{
el.style.height = h_size1 - 2+"px";
var newh = el.style.height;
alert("changing height to " + (h_size1 - 2) + "px");
alert("it is now " + newh);
setTimeout("animateHeightDown('" + id + "','" + size + "')", 1000);
} else {
if (ns6) {
document.getElementById("dwindowcontent").style.height = "1px";
}
}
}
loop one output is
h= 303 w= 165
changing height to 301px
it is now 301px
loop two output is
h= 303 w= 165
changing height to 301px
it is now 301px
etc