JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container">
<div id="left"></div>
<div id="right"></div>
<div id="center"></div>
</div>
<button id="toggle">toggle</button>

CSS

div { min-height: 200px; }
#container { overflow: hidden; border: 1px solid black; }
#left { background: red; width: 50px; float: left; }
#right { background: green; width: 100px; float: right; }
#center { background: navy; overflow: hidden; border: 1px solid cyan; }

JavaScript

$('#toggle').on('click', function () {
    $('#right').toggle();
});