Ver Mensaje Individual
  #17 (permalink)  
Antiguo 24/02/2010, 15:25
Pejigo
 
Fecha de Ingreso: febrero-2010
Mensajes: 49
Antigüedad: 14 años, 1 mes
Puntos: 0
Respuesta: Centrar fondo

Pues ya lo hice funcionar.
El código quedó así:
html {min-height:100%}
body {
background-color: #000;
background-image: url(images/fondo.jpg);
background-repeat: no-repeat;
background-position: center center;
background-attachment: scroll;
position:relative;
min-width:1024px;
min-height:100%;
}
#container {
background-image: url(images/fondohome.jpg);
position:fixed;
left: 50%;
top: 50%;
width:1000px;
height:600px;
margin-left: -500px;
margin-top: -300px;
}

Tuve que poner el container en fixed para que se centrara.
Pero el problema es que cuando alguien tenga la ventana del navegador mas pequeña, no se puede ver, por que el scroll que sale no desplaza el container.

Mil gracias daPhyre

Última edición por Pejigo; 24/02/2010 a las 16:50