如何使浮动内部div与最高div相同的高度 [英] How to make floating inner divs the same height as the highest div

查看:249
本文介绍了如何使浮动内部div与最高div相同的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在下面的代码中,我希望div与'y'匹配div的高度与3'x的。

In the following code I would like the div with 'y' to match the height of the div with the 3 'x's.

<div style="border: 0px solid red; margin: 0px 0px 5px; overflow: hidden;">
<div style="border: 1px solid rgb(129, 11, 0); margin: 0px; padding: 5px; background-color: rgb(30, 23, 22); width: 312px; float: left;">
    x<br/>x<br/>x
</div>
<div style="border: 1px solid rgb(129, 11, 0); margin: 0px; padding: 5px; width: 312px; background-color: rgb(30, 23, 22); float: right;">
    y
</div>

divs是浮动的。

推荐答案

如果你不对jQuery的一点,你可以使用 EqualHeight ,它应该做你想要的

If you're not adverse to a spot of jQuery, you can use EqualHeight, it should do what you want

这篇关于如何使浮动内部div与最高div相同的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆