Ver Mensaje Individual
  #4 (permalink)  
Antiguo 01/12/2009, 08:22
mrN
 
Fecha de Ingreso: diciembre-2009
Mensajes: 4
Antigüedad: 14 años, 5 meses
Puntos: 0
Respuesta: Centrar DIV... lo doy por imposible.

Gracias por responderme, después de vuestros consejos, he creado un div contenedor y dentro he colocado todos los demás.

En cuanto a "position: absolute", si lo elimino, desaparece por completo el div, no aparece nada y no entiendo el motivo. Aquí dejo el código con las rectificaciones y de este modo no aparece el div "contenido" por ningún sitio:

Código:
/* THE ADBOY CSS */

body {
	
	background: #1a1a1a url("images/bg.jpg") no-repeat top;
	text-align: center;
	
}

div#contenedor { 

	
}
	
div#logo {
	
	background-image: url("images/logo.png");
	background-repeat: no-repeat;
	width: 232px;
	height: 39px;
	position:absolute;
	left:44%;
	top:60px;
	
}

div#menu-bar {
	
	background-image: url("images/menu_bg.png");
	background-repeat: repeat-x;
	width: 100%;
	height: 29px;
	position: absolute;
	top: 0px;
	left: auto;
	z-index:1;
	filter: alpha(opacity=80); -moz-opacity:.80; opacity:.80;
	
}

div#destacado {
	
	background-color: #000;
	background-repeat: no-repeat;
	position: absolute;
	width: 100%;
	height: 100%;
	top: 400px;
	filter: alpha(opacity=70); -moz-opacity:.70; opacity:.70;
	
}
	

div#contenido {
	
	background-color: #333333;
	width: 1200px;
	height: 100%;
	left: inherit;
	top: 415px;
	margin: 0 auto;
	filter: alpha(opacity=70); -moz-opacity:.70; opacity:.70;

}
	
/* FIN THE ADBOY CSS */

</style>



</head>

<body>
<div id="contenedor">
<div id="logo"></div>
<div id="menu-bar"></div>
<div id="destacado"></div>
<div id="contenido"></div>
</div>
</body>
</html>