There is a function that aligns the height of the blocks with different contents:
var myHeight = function() { var mh = 0; $(".block").each(function () { var h_block = parseInt($(this).height()); if(h_block > mh) { mh = h_block; }; }); $(".block").height(mh); } I call it to load the page and to change the size of the screen.
On $ (window) .load everything works correctly.
But with $ (window) .resize there are problems: the height of the blocks does not adjust to the amount of content, as a result, when the screen is reduced, the content starts to creep out from below for some blocks.
Why it happens? How to fix it?