[Ovillo] cabecera y pie, top y bottom
Pablo Suárez León
psuarez en technosite.es
Jue Jul 20 08:55:45 UTC 2006
Vamos a ver si está...
La idea es, un contenedor principal posicionado relativamente con un height
del 100% para explorer y un min-height del 100% para el resto.
El html y body también con una altura del 100%
Una cabecera y un pie con un height posicionadas en absoluto en ese
contendor en top y botton respectivamente.
Un div contenido con un padding-top y padding-bottom igual a la altura de
cabecera y puie respectivamente.
Aquí va el html :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Prueba</title>
<style>
html,body{
height:100%;
margin:0px;
padding:0px;
}
#contenedor{
min-height:100%;
position:relative;
margin:0px auto;
}
* html #contenedor{
height:100%;
}
#cabecera{
height:25px;
width:100%;
background-color:black;
position:absolute;
left:0px;
top:0px;
}
#pie{
height:25px;
width:100%;
background-color:black;
position:absolute;
left:0px;
bottom:0px;
}
#contenido{
padding-top:25px;
padding-bottom:25px;
}
</style>
</head>
<body>
<div id="contenedor">
<div id="cabecera"></div>
<div id="contenido"</div>
<div id="pie"></div>
</div>
</body>
</html>
Probado en Firefox y explorer.
Pablo Suárez León
Analista Programador
Technosite - Grupo Fundosa
Tel: 91 121 03 30
Fax: 91 375 70 51
www.technosite.es
Más información sobre la lista de distribución Ovillo