并排divs相同的高度 [英] side by side divs with same height

查看:105
本文介绍了并排divs相同的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何改变浏览器的宽度,有时候左边的div会比左边的高或低。



我希望自动将左边或右边的div增长到与另一个相同的高度。



设置一个显示表行是最好的解决方案吗?



查看我想要开发的页面的图像。
http://i.imgur.com/BhvV2.png






我使用display = table-row,table和table-cell解决了这个问题。我已经添加了一个div作为表格。
现在完美了!看看。



http://jsfiddle.net / tcWCC / 47 /

解决方案

我使用display = table-row,table和table-cell解决了这个问题。我已经添加了一个div作为表格。现在它是完美的!看看。



http://jsfiddle.net / tcWCC / 47 /

How can I put the height of side by side DIVs?

When I change the width of browser, sometimes the left div get higher or shorter than the left.

I want that automatically the left or the right div grows up to became with the same height of the other one.

Setting a display table-row is the best solution for this?

Take a look at the image of the page I want to develop. http://i.imgur.com/BhvV2.png


I solved the problem using display=table-row, table and table-cell. I've added one div to be the table. Now it is perfect! Take a look.

http://jsfiddle.net/tcWCC/47/

解决方案

I solved the problem using display=table-row, table and table-cell. I've added one div to be the table. Now it is perfect! Take a look.

http://jsfiddle.net/tcWCC/47/

这篇关于并排divs相同的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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