JSFiddle - React, Tailwind, and code Playground

by sechou

HTML

<div class="content">
    //some content pics/text etc.
    I select 400 due to small screen.
</div>

CSS

.content { width: 550px; overflow: auto; }

JavaScript

$(function(){
    
    $(window).resize(function () { 
       if($(window).height() <= 400){
          $('div.content').css('max-height', 400);
       }else{
          $('div.content').css('max-height', ''); 
       }  
    });
});