Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/07/2012, 10:21
leonardo308
 
Fecha de Ingreso: noviembre-2010
Mensajes: 42
Antigüedad: 13 años, 5 meses
Puntos: 2
Respuesta: hacer div visible pero que no ocupe espacio

Prueba esto:

Código Javascript:
Ver original
  1. <script>
  2.     function limpiar(id){
  3.         objeto=document.getElementById(id).style;
  4.    
  5.         if(objeto.display=="none")
  6.             objeto.display="inline";
  7.         else
  8.             objeto.display="none";
  9.     }
  10. </script>
  11. <body>
  12.     <div id="contenido">
  13.         texto texto
  14.     </div>
  15.  
  16.     <div id="presentacion">
  17.         texto texto
  18.     </div>
  19.     <button onclick="limpiar('contenido')">Probar</button>
  20. </body>

En el onclick le pasas como parametro el id que quieras ocultar o aparecer.

Espero haberte ayudado.