JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container">
    <div id="DivToRuleThemAll">
        <div class="box">
            <div class="sub">1</div>
            <div class="sub">2</div>
        </div>
        <div class="box">
            <div class="sub">3</div>
            <div class="sub">4</div>
        </div>
        <div class="box">
            <div class="sub">5</div>
            <div class="sub">6</div>
        </div>
    </div>
</div>

CSS

div#container
{
    border: 5px solid black;
    padding: 5px;
    height: 350px;
    overflow-y: hidden;
    overflow-x: auto;
}

div.sub
{
    background-color: #1589FF;
    width: 200px;
    height: 150px;
    font-weight: bold;
    font-size: 50px;
    color: #47BBFF;
    text-align: center;
    border: 1px solid black;
    margin: 5px;
}

div.box
{
    float: left;
}

JavaScript

var DivToRuleThemAll = $('#DivToRuleThemAll'); /* cache the selector */

$('#DivToRuleThemAll').css({ width: DivToRuleThemAll.width() });