2009-10-09 71 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;