Bài đăng

Đang hiển thị bài đăng từ tháng 10 1, 2015

Chỉnh chiều cao của fieldset giống nhau

Using simple jQuery code you can achieve the equal column height DEMO 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 ); });