PDA

View Full Version : Java Script to resize a div tag?


m1a2x3x7
07-30-2007, 06:52 PM
Is it possible for Java Script to change the size of a div tag say on rollover?

m1a2x3x7
07-30-2007, 07:21 PM
nm I got it.

<script>
function changeBig(){
this.navbar=document.getElementById("navbar");
this.navbar.style.width = '787px';
this.navbar.style.height= '155px';
}

function changeSmall(){
this.navbar=document.getElementById("navbar");
this.navbar.style.width = '787px';
this.navbar.style.height= '40px';
}
</script>
<body><a onMouseOver="changeBig();" onmouseout="changeSmall();"><div id="navbar"></div></a>