0

我得到了这个 div 结构: 结构

DIV3 具有固定的高度。

嵌套的 DIV5 将从 Ajax 获取内容,因此高度会发生变化。另外,它里面还有一些 DHTML 也会改变高度。DIV5 具有固定的最小高度。

DIV6 有固定的内容,但是高度必须根据 DIV5 的高度变化。

问题:如果我将 DIV6 高度设置为“自动”,则大小可以,但滚动条不起作用。如果我设置为 '100%' 滚动条有效,但 DIV6 的末端被剪切,则 DIV5 会增加其高度。

不确定它是否足够清楚...

编码:

    <div style="height: 850px; width: 1000px; display: table;">
    <div style="height: 850px; float: left;"></div>
    <div style="height: 850px; width: 598px; float: left;">
        <div id="DIV5" style="max-height: 200px; width: 598px; overflow-x: hidden; overflow-y: scroll;"></div>
        <div id="DIV6" style="height: 200px; width: 598px; overflow-x: hidden; overflow-y: scroll;"></div>
    </div>
<div id="definicoes" style="height: 850px; width: 200px; float: left;"></div>
</div>
4

1 回答 1

0

尝试设置 Div 6 bottom: 0px; 但是我会使用 jquery 用 js 计算高度。

于 2013-10-25T17:09:04.993 回答