2011-11-17 56 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 

}