Tony
Tony

Reputation: 3805

Thumbnails with one height

I want my thumbnails to have the same height. Take a look at the picture: enter image description here 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

Answers (1)

Marvin Fischer
Marvin Fischer

Reputation: 2572

I suggest you the use of flexbox: http://www.w3schools.com/css/css3_flexbox.asp

Upvotes: 1

Related Questions