开发者

Same width in different columns using css

开发者 https://www.devze.com 2023-02-10 21:41 出处:网络
I have to columns, lets say rside and lside. They dont have fixed height. I want each time to adjust their width accordingly. So if lside is bigger, rside should be the same height.

I have to columns, lets say rside and lside. They dont have fixed height. I want each time to adjust their width accordingly. So if lside is bigger, rside should be the same height.

So both of them should have some height according to 开发者_Go百科the higher of those.


You should do it by javascript - get size of both and than set the bigger one to smaller column :-) I think you cant do it by css if you dont know size of content before.


Please check http://matthewjamestaylor.com/blog/equal-height-columns-cross-browser-css-no-hacks , the best explanation of achieving equal height columns and I'm sure a lot of people have asked this question.

Other answers on StackOverflow:-
1) HTML/CSS: Making two floating divs the same height
2) Columns of Equal Height with JQuery

0

精彩评论

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

关注公众号