Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/10/2012, 13:30
BrunoIV
 
Fecha de Ingreso: enero-2012
Mensajes: 20
Antigüedad: 12 años, 2 meses
Puntos: 0
Pregunta No me aclaro con los div

Hola, según tengo entendido no es apropiado usar tablas para maquetar páginas web, pero no consigo realizar lo que quiero con capas.

Lo que quiero hacer es esto (pero con capas):
Código:
			<table width="100%" height="100%" border="1">
				<tr style="height:100px;">
					<td>Cabecera</td>
				</tr>
				
				<tr>
					<td>Cuerpo auto-extensible</td>
				</tr>
				
				<tr style="height:100px;">
					<td>Pie de página</td>
				</tr>
			</table>

He intentado esto con capas:
Código:
		<div id="wrapper">			
			<div id="header">Head</div>
			<div id="body">Body</div>
			<div id="footer">Footer</div>
		</div>
Código:
#wrapper {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: red;

}
#header {
	position: relative;
	top: 0;
	left: 0;
	width: 100%;
	height: 250px;
	background-color: #2e2721;
}

#body {
	position: relative;
	width: 100%;
	height: auto;
	background-color: #39302b;
	clear:both
}

#footer {
	position: relative;
	height: 150px;
	bottom: 0;
	width: 100%;
	background-color: #2e2721;
}