Ver Mensaje Individual
  #6 (permalink)  
Antiguo 16/02/2012, 16:39
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Problemas con un diseño fluid

Asumiendo ( de tu ejemplo) que el contenido del header y footer es estático y podés determinar que valores en porcentajes tenés que asignarles, el sobrante se lo das al contenido

Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <html lang="es-ar">
  3. <meta charset="utf-8" />
  4. <title>Html5</title>
  5.  
  6. <style type="text/css">
  7. /*<![CDATA[*/
  8.  
  9. html, body{
  10. height: 100%;
  11. padding: 0;
  12. margin: 0;
  13. }
  14.  
  15. div{
  16. width: 960px;
  17. margin: 0 -480px;
  18. left: 50%;
  19. position:absolute;
  20. overflow: hidden;
  21. }
  22.  
  23. #header{
  24. top: 0;
  25. height: 15%;
  26. }
  27.  
  28. #footer{
  29. bottom: 0;
  30. height: 10%;
  31. }
  32.  
  33. #contenido{
  34. overflow-y: scroll;
  35. height: 75%;
  36. /* el top ara contenido = al height del header */
  37. top: 15%;
  38. }
  39.  
  40. /*]]>*/
  41. </head>
  42. <div id="header">
  43. header
  44. </div>
  45. <div id="contenido">
  46. Lorem ipsum dolor sit amet, longa sustineat in deinde duas horrido in fuerat est
  47. </div>
  48. <div id="footer">
  49. footer
  50. </div>
  51. </body>
  52. </html>

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.