Skip to content

Instantly share code, notes, and snippets.

@sgraber
Created February 7, 2010 02:17
Show Gist options
  • Save sgraber/297135 to your computer and use it in GitHub Desktop.
Save sgraber/297135 to your computer and use it in GitHub Desktop.
// max height for columns using jQuery
// Unfortunately css does not support this natively, sometimes when creating column based
// layouts it looks so much better if the columns aligned by height, so here is the easy way
// of doing this.
var max_height = 0;
$("div.col").each(function(){
if ($(this).height() > max_height) { max_height = $(this).height(); }
});
$("div.col").height(max_height);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment