Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/05/2010, 08:16
dluxox_
 
Fecha de Ingreso: mayo-2010
Mensajes: 39
Antigüedad: 13 años, 10 meses
Puntos: 0
Respuesta: Problema para alinear capas

Este es mi primer post y te envio esto .. a mi me a hecho de utilidad

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<TITLE>A frame document with CSS 2.1</TITLE>
<STYLE type="text/css" media="screen">
BODY { height: 8.5in } /* Required for percentage heights below */
#header {
position: fixed;
width: 100%;
height: 15%;
top: 0;
right: 0;
bottom: auto;
left: 0;
}
#sidebar {
position: fixed;
width: 10em;
height: auto;
top: 15%;
right: auto;
bottom: 100px;
left: 0;
}
#main {
position: fixed;
width: auto;
height: auto;
top: 15%;
right: 0;
bottom: 100px;
left: 10em;
}
#footer {
position: fixed;
width: 100%;
height: 100px;
top: auto;
right: 0;
bottom: 0;
left: 0;
}
</STYLE>
</HEAD>
<BODY>
<DIV id="header"> ... </DIV>
<DIV id="sidebar"> ... </DIV>
<DIV id="main"> ... </DIV>
<DIV id="footer"> ... </DIV>
</BODY>
</HTML>


la central no se posiciona de forma relativa sino como fixed
position: fixed;
position: relativa; funciona bn para los ementos que estan sujetos a fixed :D

sAludos