2011-09-08 70 views
1

沒有人知道爲什麼模式中的div不能垂直拉伸,但頁面上的div做什麼?爲什麼這個div在模態中不能垂直拉伸?

Here is a demo

.container { 
    width: 150px; 
    background-color: yellow; 
    overflow:hidden; 
} 
.left { 
    display:none; 
    float: left; 
    width: 150px; 
    background: green; 
} 
.right { 
    float: right; 
    width: 150px; 
    background-color: red; 
} 

感謝很多:)

回答

3

.left膨脹到其內容的大小,因爲沒有定義height:。盒裝版本的內容較少,因此DIV較短。

+0

天啊!我忘了這個文件是從外部加載的,還有另外一個div。感謝Diodeus :) – pufAmuf