JSFiddle - React, Tailwind, and code Playground

HTML

<div id="content" class="content"></div><div class="sidebar"></div>

CSS

html, body
{
    width: 100%;
    height: 100%;
    margin: 0;
}

div
{
    margin: 0;
    vertical-align:top;
}
.content
{
    display: inline-block;
    width: 80%;
    min-height: 100%;
    background: blue;
    color: white;
}

.sidebar
{
    display: inline-block;
    width: 20%;
    min-height: 100%;
    background: red;
}

JavaScript

$(function(){
   
    setInterval(function(){
        $(".content").append("<br>test");
        
        $(".sidebar").css("min-height", document.getElementById("content").scrollHeight);
    }, 50);
    
});