Reputation: 3805
I want my thumbnails to have the same height. Take a look at the picture:
I tried this code I foud there:
function equalHeight(group) {
var tallest = 0;
group.each(function() {
var thisHeight = $(this).height();
if(thisHeight > tallest) {
tallest = thisHeight;
}
});
group.each(function() { $(this).height(tallest); });
}
But it doesn't count image size. Also it can't handle window size changings. How to fix that?
Upvotes: 1
Views: 25
Reputation: 2572
I suggest you the use of flexbox: http://www.w3schools.com/css/css3_flexbox.asp
Upvotes: 1