Ver Mensaje Individual
  #6 (permalink)  
Antiguo 05/10/2010, 06:12
opzina
 
Fecha de Ingreso: marzo-2008
Mensajes: 1.020
Antigüedad: 16 años, 1 mes
Puntos: 21
Respuesta: Footer... margin-top: auto

Cita:
Iniciado por kseso? Ver Mensaje
Esa estructura se conoce, entre otros nombres, como "pie abajo".
Hay varias técnicas para lograrlo.
Una muy simple:
Código CSS:
Ver original
  1. * {margin:0; padding:0;}
  2.  
  3. html, body { height: 100%;}
  4.  
  5. #contenedor {
  6. min-height: 100%;
  7. height: auto !important;
  8. height: 100%;
  9. margin-bottom: -1em;
  10. }
  11.  
  12. .empuje {height:1em;}
  13.  
  14. #pie {
  15. min-height: 1em;
  16. height: auto !important;
  17. height: 1em;
  18. }
y el html
Código HTML:
Ver original
  1. <div id="contenedor">
  2.     <!-- Todo el contenido menos el pie -->
  3.     <div class="empuje"></div>
  4. </div>
  5. <div id="footer">
  6.     <!-- Contenido del pie -->
  7. </div>
Puede verla en línea aquí


Pero si lo hace así con poco contenido el footer le va a quedar pegado abajo y el contenido y el header muuuyy arriba. Si puedes mira mi rta. gracias.