F
F
Forge01002015-10-24 18:06:30
css
Forge0100, 2015-10-24 18:06:30

How to set the same height of two blocks?

99e665d2300849ecb8cd6711d4d3f97c.png
This is a Table block, but the height of the two blocks is not the same, the reason is that I wrapped these 2 blocks with a link
Here is the CodePen

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
holfza, 2015-10-24
@Forge0100

codepen.io/anon/pen/RWMNGJ

W
westdp, 2015-10-24
@westdp

Hold the script)

var columns = $('.footer__link');
    $(window).resize(function () {
        setEqualHeight(columns);
    });
    $(document).ready(function () {
        setEqualHeight(columns);
    });
    $(window).ready(function () {
        setEqualHeight(columns);
    });
    function setEqualHeight(columns) {
        if (columns.length < 3) {
        var tallestcolumn = 0;
        columns.css('height', '');
        columns.each(function() {
            currentHeight = $(this).height();
            if(currentHeight > tallestcolumn) {
                tallestcolumn = currentHeight;
            }
        });
        columns.height(tallestcolumn);
        }
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question