Ver Mensaje Individual
  #6 (permalink)  
Antiguo 25/08/2011, 15:53
Avatar de ArturoGallegos
ArturoGallegos
Moderador
 
Fecha de Ingreso: febrero-2008
Ubicación: Morelia, México
Mensajes: 6.774
Antigüedad: 16 años
Puntos: 1146
Respuesta: Problema con div general (creo)

Cita:
Iniciado por Melehb Ver Mensaje
Lo que pasa que los float son necesarios... es decir, si los quitase el div derecho se pondría bajo el izquierdo no al lado.
ahora si me alegraste el día, veo que me mal interpretaste y no tienes idea que fue lo que dije

limpiar los float no quise decir que los eliminaras... te pongo este código meramente ilustrativo para ejemplificar lo que dije o quise decir
Código HTML:
Ver original
  1. <!-- Con float sin limpiar -->
  2. <div style="width:500px;border:1px #333 solid;margin:auto;padding:10px;">
  3.     <div>Demo</div>
  4.     <div style="width:150px;background:#fe0;float:left;">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.</div>
  5.     <div style="width:348px;background:#f00;float:right;">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.</div>
  6. </div>
Código HTML:
Ver original
  1. <!-- limpiar float metodo 1 (recomendado) -->
  2. <div style="width:500px;border:1px #333 solid;margin:auto;padding:10px;overflow:hidden;">
  3.     <div>Demo</div>
  4.     <div style="width:150px;background:#fe0;float:left;">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.</div>
  5.     <div style="width:348px;background:#f00;float:right;">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.</div>
  6. </div>
Código HTML:
Ver original
  1. <!-- limpiar float metodo 2 -->
  2. <div style="width:500px;border:1px #333 solid;margin:auto;padding:10px;">
  3.     <div>Demo</div>
  4.     <div style="width:150px;background:#fe0;float:left;">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.</div>
  5.     <div style="width:348px;background:#f00;float:right;">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.</div>
  6.     <div style="clear:both;">.</div>
  7. </div>

y por favor pase a leer los libros de XHTML y CSS -> clic aquí