Ver Mensaje Individual
  #7 (permalink)  
Antiguo 09/04/2012, 21:40
tapuntdesign
 
Fecha de Ingreso: julio-2011
Mensajes: 83
Antigüedad: 12 años, 10 meses
Puntos: 24
Respuesta: Altura 100% pero quitando 40px

Cita:
Iniciado por emprear Ver Mensaje
Esto te puede servir
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>titulo</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6.  
  7. <style type="text/css">
  8. /*<![CDATA[*/
  9.  
  10. /* estilos */
  11.  
  12. html, body {
  13. height: 100%;
  14. border: none;
  15. padding: 0;
  16. margin: 0;
  17. }
  18.  
  19. #head{
  20. height: 40px;
  21. width: 100%;
  22. position: absolute;
  23. background-color: #ccc;
  24. z-index: 999;
  25. }
  26.  
  27. #box {
  28. position: absolute;
  29. top:0;
  30. left: 0;
  31. height: 100%;
  32. width: 100%;
  33. padding-top: 40px;
  34. box-sizing:border-box;
  35. -moz-box-sizing:border-box; /* Firefox */
  36. -webkit-box-sizing:border-box; /* Safari */
  37. background-color: lime;
  38. }
  39.  
  40. /*]]>*/
  41. </head>
  42. <div id="box">Altura: lo que queda de pantalla</div>
  43. <div id="head">tiene 40px de alto</div>
  44. </body>
  45. </html>

Con la propiedad box-sizing integrás el padding(top) de 40px en el alto evitando que se sumen al 100%, el z-index no es imprescindible si mantenes ese orden, pero no está demás ponerlo

SAludos
Y con box-sizing y border-box puedes crear un borde superior de 40px que se reste al tamaño total.