Answer the question
In order to leave comments, you need to log in
How to set the same height of two blocks?
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
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 questionAsk a Question
731 491 924 answers to any question