我有8個div,我將它們全部向左浮動,因爲我希望它們全部位於同一行,並溢出其容器。出於某種原因,他們是成對的,我不確定爲什麼。這裏是的jsfiddle http://jsfiddle.net/wp9jB/左側浮動多個元素
這裏是代碼:
.standard_containers {
width:275px;
padding-top:15px;
padding-right:10px;
padding-left:10px;
padding-bottom:15px;
float:left;
margin-left:7px;
margin-right:7px;
}
<div style="width:690px;border:1px solid red;position:relative;">
<div class="standard_containers shadow gradient_2">
<p class="head_med_blue">Physical Thearpy Protocols</p>
</div>
<div class="standard_containers shadow gradient_2">
<p class="head_med_blue">Physical Thearpy Protocols</p>
</div>
<div class="standard_containers shadow gradient_2">
<p class="head_med_blue">Physical Thearpy Protocols</p>
</div>
<div class="standard_containers shadow gradient_2">
<p class="head_med_blue">Physical Thearpy Protocols</p>
</div>
<div class="standard_containers shadow gradient_2">
<p class="head_med_blue">Physical Thearpy Protocols</p>
</div>
<div class="standard_containers shadow gradient_2">
<p class="head_med_blue">Physical Thearpy Protocols</p>
</div>
<div class="standard_containers shadow gradient_2">
<p class="head_med_blue">Physical Thearpy Protocols</p>
</div>
<div class="standard_containers shadow gradient_2">
<p class="head_med_blue">Physical Thearpy Protocols</p>
</div>
<br style="clear:both;" />
</div>
他們不能溢出嗎? – loriensleafs