<div>
<div style="float:left;"></div>
<div style="float:right;"></div>
<div style="clear:both;"></div>
</div>
解決方法2:
<div style="overflow:auto;">
<div style="float:left;"></div>
<div style="float:right;"></div>
</div>
解決方法3:
設置DIV需要三個參數:
height:高度;
min-height:最小高度(只針對火狐,IE不識別該標籤)
!important:重要,提前;(當該標籤出現在同一選擇器裏時,火狐優先執行,而IE默認執行最後一 個屬性)
需要注意的是:在針對一個需要定高度,同時又希望能高度隨內容的變化自適應的話,寫法的順序要注意;下面是正確的定義順序;
height:auto !important;
min-height:89px;
height:90px;