Kind, as with resize fankshn recalculate the height minus 150 pixels. That is, there is a function that checks the height of the window and if the height is less than a certain value is transferred to a certain class, the height of the window object, is it possible to somehow transfer the height and recalculate it minus 150 pixels, something like that.
function msgHeightSize(){ if ($(window).height() <= '830'){ $('.msgs-scroll').css( 'height', $(window).height() ); } } $(window).load(function() { msgHeightSize() }); $(window).resize(function(){ msgHeightSize() });