JSFiddle - React, Tailwind, and code Playground

HTML

<body>
    <div class=one >content1</div>
    <div class=two >content2</div>
</body>

CSS

.one {width: 50px;}
.two {width: 70px;}

JavaScript

var max = 0;
    $('body').find('div').each(function(){
        var width = $(this).outerWidth(true);
        if (width > max){
            max = width;
        };
    });
    alert(max);
    $("body").css("minWidth", max+"px");