开发者

Size of overflow:hidden div with position:absolute one inside

I have html code like this:

<div style="overflow: hidden;">
    <div style="position: absolute;">
         some content
    </div>
    <div>
        content with unknown height
    </div>
</div>

Outer block has overflow:hidden, because it should be开发者_如何学编程 resized according to resizing of the second inner block. But this way the first inner block is cropped if the second one (and so the outer one) is not big enought.

How can I get it not cropped (or another way to make outer div resized)?


As far as I understand your question:

overflow: hidden; hides the scrollbars and keeps the element at its specified dimensions. Either you can change it to overflow: auto; or just remove it as that is the default state.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜