Foros del Web » Creando para Internet » CSS »

divs de fondo

Estas en el tema de divs de fondo en el foro de CSS en Foros del Web. buenas a todos tengo un problema, lo que quiero hacer es tener una imagen de fondo para el lado derecho y una para el lado ...
  #1 (permalink)  
Antiguo 21/02/2011, 17:51
Avatar de gabriel720  
Fecha de Ingreso: febrero-2007
Ubicación: Guatemala
Mensajes: 96
Antigüedad: 17 años, 1 mes
Puntos: 1
divs de fondo

buenas a todos tengo un problema, lo que quiero hacer es tener una imagen de fondo para el lado derecho y una para el lado izquierdo quedanto la pagina en el centro

pero no se como hacerlo, ya que lo puedo hacer solo que una sola imagen pero no con una de cada lado
  #2 (permalink)  
Antiguo 21/02/2011, 19:11
Avatar de ArturoGallegos
Moderador
 
Fecha de Ingreso: febrero-2008
Ubicación: Morelia, México
Mensajes: 6.774
Antigüedad: 16 años, 1 mes
Puntos: 1146
Respuesta: divs de fondo

pues habría que analizar a detalle las necesidades particulares de lo que se desea alcanzar pero por el momento así rápido me viene a la mente un ejemplo como este que quizás le sea de ayuda para darse una idea

Código CSS:
Ver original
  1. html,body{margin:0;padding:0;height:100%;overflow:hidden;}
  2. #Fondo1,#Fondo2,#Site{position:absolute;z-index:-10;top:0;width:50%;height:100%;}
  3. #Fondo1{left:0;background:#03f;}
  4. #Fondo2{right:0;background:#fe0;}
  5. #Site{z-index:1;left:0;width:100%;overflow:auto;}
  6. #ContentSite{width:900px;margin:auto;background:#fff;}

Código HTML:
Ver original
  1. <div id="Fondo1">&nbsp;</div>
  2. <div id="Fondo2">&nbsp;</div>
  3. <div id="Site">
  4.     <div id="ContentSite">
  5. <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
  6. <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
  7. <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
  8.     </div>
  9. </div>

Etiquetas: fondo
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:12.