JSFiddle - React, Tailwind, and code Playground
HTML
<div id="wrapper">
<div id="sideBar"></div>
<div id="mainContent"></div>
</div>
CSS
#wrapper{
width:600px;
height:400px;
background:#f5f5f5;
}
#sideBar{
width:200px;
height:200px;
background:red;
display:block;
float:left;
}
#mainContent{
height:200px;
background:blue;
display:block;
float:left;
}
JavaScript
var w = $('#wrapper').width();
var s = $('#sideBar').width();
$('#mainContent').width(w - s);