Are you talking about something like this??
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Grow Layer Animation</title>
<script type="text/javascript">
function animateHeight(id, size){
el = document.getElementById(id);
var h_size1 = el.offsetHeight;
if (h_size1 < size){
el.style.height = h_size1 + 2+"px";
setTimeout("animateHeight('" + id + "','" + size + "')", 1);
}
}
function decreaseHeight(id, size){
el = document.getElementById(id);
var h_size1 = el.offsetHeight;
if (h_size1 > size){
el.style.height = h_size1 - 2 + "px";
setTimeout("decreaseHeight('" + id + "','" + size + "')", 1);
}
}
</script>
<style type="text/css">
#Layer1 {
position:absolute;
width:500px;
height:0px;
z-index:1;
left: 256px;
top: 80px;
background-color: #996600;
}
</style>
</head>
<body>
<a href="javascript:animateHeight('Layer1','50');">Open</a>
<a href="javascript:decreaseHeight('Layer1','0');">Close</a>
<div id="Layer1"></div>
</body>
</html>
Bookmarks