2011-11-17 103 views

回答

2

從css class .left中刪除"clear: both;",這樣就可以了。

NEW update class .left to「clear:left;」

.left { 
    float: left; 
    clear: left; 
    background: yellow; 
} 

,並把你的右格是在第一個地方像下面

<div class="content"> 
     <div class="right"></div> 
    <div class="left"></div> 
    <div class="left"></div> 

</div> 

例如:http://jsfiddle.net/ED4WJ/5/

+0

但是OP想要堆疊這兩個黃色的DIV。 –

+0

他們堆疊,你的意思是跳過 –

+0

OP想要垂直堆疊,而不是並排。 –

0
<div class="content"> 
    <div class="left"></div> 
    <div class="left"></div> 
    <div class="right"></div> 
</div> 

CSS

.content 

{ 
    Float:left; 
    width:960px; 
    height:100px; 

} 

.left 
{ 
float:left; 
width:40%; 
height:100%; 
background-color:red 
} 

.right 
{ 
    float:left; 
    width:20%; 
    height:100%; 
    background-color:yellow 

}