JavaScript
Article
By Sam Deering

jQuery Equalize Column Heights

By Sam Deering

Simple jQuery code snippet to make your column heights equal.

// Equalize column heights
var tallest = 0;
$('#list, #of, #elements')
.each(function(){
	var thisHeight = $(this).outerHeight();
	if (thisHeight > tallest) tallest = thisHeight;
})
.css({
	'overflow': 'auto',
	'height': tallest
});
  • Chad

    Can’t seem to get this to work. Would be handy in many situations.
    Can you write more instructions?

    Thanks
    Chad

Recommended
Sponsors
Get the latest in JavaScript, once a week, for free.