Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/01/2008, 11:05
chefnelone
 
Fecha de Ingreso: diciembre-2005
Ubicación: Barcelona
Mensajes: 1.428
Antigüedad: 18 años, 4 meses
Puntos: 15
Ocultar div "absolute" ?

Hola

No me funciona este codigo que es para ocultar un div que tiene posicion absoluta

Código:
<html>
<head>
<style>
.div_mensaje{
width: 100%;
height: 880px;
background-color: white;
left: 0px;
top: 0px;
position: absolute;
z-index: 100;
}
</style>
<script type="text/javascript">
function quitaDiv(){

a=document.getElementById("div_mensaje").display;
document.getElementById("div_mensaje").display="none";
alert(a);
}

</script>
</head>
<body>
<div id="div_mensaje" class="div_mensaje" style="display:block;">
<div style="margin-right:auto;margin-left:auto;margin-top:200px;width:500px;border:3px red solid;">
<a href="javascript:quitaDiv();">CERRAR</a>
</div>
</div>
</body>
</html>


que estoy haciendo mal. Se puede ocultar un div con posicion absoluta?