Created
September 13, 2010 04:17
-
-
Save 0xnbk/576799 to your computer and use it in GitHub Desktop.
Columns of equal height
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function equalHeight(group) { | |
tallest = 0; | |
group.each(function() { | |
thisHeight = $(this).height(); | |
if(thisHeight > tallest) { | |
tallest = thisHeight; | |
} | |
}); | |
group.height(tallest); | |
} | |
/* | |
Usage: | |
$(document).ready(function() { | |
equalHeight($(".recent-article")); | |
equalHeight($(".footer-col")); | |
}); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Columns of equal height
This seems to be a highly-requested hack: How to use two CSS columns, and make them having exactly the same height? Happilly Rob from cssnewbie have the solution.