2009-10-09 80 views
1

我有一個主股利和內部的我顯示如下CSS:保持固定高度DIV在Firefox和IE

<div id='divMasterContainer' style="height:200px;"> 
    <div id='child1'> 
     // Some child contents here (Radio button/Button etc..) 
    </div> 
    <div id='child2'> 
    // Some child contents here (Radio button/Button etc..) 
    </div> 
    <div id='child3'> 
    // Some child contents here (Radio button/Button etc..) 
    </div> 
</div> 

多個div作爲list.My HTML因此Firefox渲染時,該mastercontainer div的高度是200 px。但在IE中,它隨着它所擁有的子div的數量而增長。我正在使用這些div與jFlow插件來實現滑塊控件。我想在兩個瀏覽器中爲master div保留相同的高度。我也不需要在主div中的滾動條。

+0

嘗試使用溢出:隱藏你的主容器 – halocursed 2009-10-09 05:50:17

回答

2

你需要確保主DIV具有「隱藏」溢出:

<div id='divMasterContainer' style="height:200px;overflow:hidden;"> 
1

也許你可以嘗試在風格標籤具有這樣的:

overflow:hidden;