Using simple jQuery code you can achieve the equal column height
HTML
<div id="container">
<fieldset class="box">
<legend>Title</legend>CONTENT
<br/>test</fieldset>
<fieldset class="box">
<legend>Title</legend>CONTENT</fieldset>
<fieldset class="box">
<legend>Title</legend>CONTENT</fieldset>
</div>
CSS
.box {
float:left;
width:25%;
}
jQuery
$(function () {
var H = 0;
$("div").each(function (i) {
var h = $(".box").eq(i).height();
if (h > H) H = h;
});
$(".box").height(H);
});
Nhận xét
Đăng nhận xét