2010-09-19 4 views
0
<div style="width: 800px;border:1px solid black"> 
      <div style="width:100px;height:100px;float:left;border:1px solid black"></div> 
      <div style="float:left">ssdfsdfsdfsdgfag25w6a4g8w5614w5sge16dgf45d4sdffffffffffffffffffffffffffffffffffffffffffffffffffffff5s4f64s6f456a46f456a456456456f456we4f54we5gf45456v4sd5646sadf54s56f465as4f564as56f</div> 
      <div style="clear:both"></div> 
    </div> 

Il finissent comme ceci: alt text comment y remédierQuestion sur CSS float: left

Répondre

2

a mis une largeur sur le 2ème enfant div. vous devrez également placer un espace dans cette chaîne car il ne peut pas l'envelopper à travers les lignes.

<div style="width: 800px;border:1px solid black"> 
      <div style="width:100px;height:100px;float:left;border:1px solid black"></div> 
      <div style="float:left; width: 100px">ssdfsdfsdfsdgfag25w6a4g8w5614w5sge16dgf45d4sdffffffffffffffffffffffffffffffffffffffffffffffffffffff5s4f64s6f456a46f456a456456456f456we4f54we5gf45456v4sd5646sadf54s56f465as4f564as56f</div> 
      <div style="clear:both"></div> 
    </div> 
0

Régler la hauteur de 100 à pour principal div

+0

Je ne veux pas la hauteur définie pour div principale – meotimdihia