JavaScript
Article
By Sam Deering

jQuery Equalize Column Heights

By Sam Deering

Simple jQuery code snippet to make your column heights equal.

--ADVERTISEMENT--

// 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
});
Recommended
Sponsors
The most important and interesting stories in tech. Straight to your inbox, daily. Get Versioning.
Login or Create Account to Comment
Login Create Account