Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/06/2011, 17:00
conexion
 
Fecha de Ingreso: febrero-2011
Mensajes: 54
Antigüedad: 13 años, 1 mes
Puntos: 13
Respuesta: Caso inexplicable

Tienes que establecer la relación de posición entre ellos; si no lo haces, el navegador no entenderá la composición.

Una solución:
Código HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<style>
			html, body { width:100%; height:100%; margin:0 }
			#padre { background:blue; height:100%; position: relative }
			#hijo { background:red; width:500px; height:300px; position: absolute; margin-left: -250px; left: 50%; top: 100px; }
		</style>
	</head>
	<body>
		<div id="padre">
			<div id="hijo"></div>
		</div>
	</body>
</html>