我有两个div并排。我希望它们的高度相同,并且如果其中之一调整大小,则保持不变。我无法弄清楚这一点。有想法吗?
为了澄清我一个令人困惑的问题,我希望两个框的尺寸始终相同,因此,如果一个框由于文本放置而增大,则另一个框应与高度匹配。
<div style="overflow: hidden">
<div style="border:1px solid #cccccc; float:left; padding-bottom:1000px; margin-bottom:-1000px">
Some content!<br/>
Some content!<br/>
Some content!<br/>
Some content!<br/>
Some content!<br/>
</div>
<div style="border:1px solid #cccccc; float:left; padding-bottom:1000px; margin-bottom:-1000px">
Some content!
</div>
</div>
What I did here is to change the height to min-height and gave it a fixed value. if one of them is getting resized the other one will stay the same height. not sure if this is what you want