Ver Mensaje Individual
  #5 (permalink)  
Antiguo 10/04/2008, 09:46
guilledocke
 
Fecha de Ingreso: noviembre-2002
Ubicación: Avellaneda
Mensajes: 247
Antigüedad: 21 años, 5 meses
Puntos: 0
Re: Altura 100% en div contenedor - CSS

Tenes razón, quizas me exprese mal, lo que queria es un div contenedor que ocupe todo el alto de la pagina sin importar su contenido, si probas el codigo que me pasas con un contenido mayor el fondo se corta,

encontre esto otro, la unica contra que tiene es que me genera scroll en el div contenedor cuando el contenido es mayor al alto de la pag.

asi que por el momento tendre que utilizar dos contenedores, uno para poco contenido y otro para mas contenido

gracias!


html
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>arg::::::::::::::::::::::::</title>
<link href="styles/style.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div id="contenedor">
	<div id="interior">
	Don't set the height of a div to 100% unless it's container element has a specific height set. 100% of auto = auto. If Microsoft value CSS compliance then IE7 will likely fix the bug in IE6 that makes it respond to height=100% because it is wrong according to the CSS specification. So don't waste any more time thinking about "how can I get this trick to work in other browsers?".
	Don't set the height of a div to 100% unless it's container element has a specific height set. 100% of auto = auto. If Microsoft value CSS compliance then IE7 will likely fix the bug in IE6 that makes it respond to height=100% because it is wrong according to the CSS specification. So don't waste any more time thinking about "how can I get this trick to work in other browsers?".
	Don't set the height of a div to 100% unless it's container element has a specific height set. 100% of auto = auto. If Microsoft value CSS compliance then IE7 will likely fix the bug in IE6 that makes it respond to height=100% because it is wrong according to the CSS specification. So don't waste any more time thinking about "how can I get this trick to work in other browsers?".
	Don't set the height of a div to 100% unless it's container element has a specific height set. 100% of auto = auto. If Microsoft value CSS compliance then IE7 will likely fix the bug in IE6 that makes it respond to height=100% because it is wrong according to the CSS specification. So don't waste any more time thinking about "how can I get this trick to work in other browsers?".
	</div>
</div>

</body>
</html>
CSS
Código:
body, html {
	margin: 0px;
	text-align: center;
	height: 100%;
}

#contenedor {
	width: 700px;
	background-color: #CCCCCC;
	margin-left: auto;
	margin-right: auto;
	height: 100%;
	overflow: auto;
}

#interior {
	width: 500px;
	margin-left: 100px;
	float: left;
}
__________________
www.elumina.com.ar