Skip to content

Instantly share code, notes, and snippets.

@0xnbk
Created September 13, 2010 04:17
Show Gist options
  • Save 0xnbk/576799 to your computer and use it in GitHub Desktop.
Save 0xnbk/576799 to your computer and use it in GitHub Desktop.
Columns of equal height
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"));
});
*/
@0xnbk
Copy link
Author

0xnbk commented Sep 13, 2010

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment