Click to See Complete Forum and Search --> : Real Quick...


diamonds
08-20-2003, 03:52 PM
Is there a way to change the height of a div?
I know there is, I just dont know what it is:
Ive tried this:
document.all['layer1'].style.height='1';

pyro
08-20-2003, 04:09 PM
Try adding a px to the end of that... Also, you might want to use document.getElementById for cross-browser compatability:

<script type="text/javascript">
function change() {
document.getElementById("mydiv").style.height = "1px";
}
</script>

diamonds
08-20-2003, 04:27 PM
Works Great!
Thanks!

pyro
08-20-2003, 04:31 PM
You bet... :)