E
E
Egor Lavrenov2018-02-15 20:04:52
css
Egor Lavrenov, 2018-02-15 20:04:52

How to make blocks equal in height with isotope?

5a85bd4590c09342569079.png
There is such a grid, you need to make the blocks automatically adjust in height, according to the highest.
I use the isotope plugin, so the flex option won't work.
It's possible to write in js, but what if there is an elegant solution in css?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Lavrenov, 2018-02-15
@EgorWeb

function eqipmentHeight(){
    var eqipment = $('.eqipment'),
        maxHeight = 0;

    eqipment.each(function(index, el) {
      var eqipmentHeight =  parseInt($(this).height());
      eqipmentHeight > maxHeight ? maxHeight = eqipmentHeight : false;
    });

    eqipment.height(maxHeight);
  };

Here is the solution, it turned out to be faster to write than squirming with css

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question