JSFiddle - React, Tailwind, and code Playground
HTML
<div id="container">
<div id="container-header">
<div id="header">header</div>
</div>
<div id="container-main">
<div id="menuleft"></div>
<div id="content">
<div id="contop">top</div>
<div id="conbot">bottom</div>
</div>
<div id="menuright"></div>
</div>
</div>
CSS
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
#container {
width: 100%;
height: 100%;
background-color: black;
}
#container-header {
float: top;
width: 100%;
height: 30px;
background-color: blue;
margin-bottom: 5px;
}
#container-main {
width: 100%;
height: 100%;
background-color: orange;
}
#header {
width: 100%;
height: 100%;
}
#menuleft {
width: 100px;
margin-left: 0px;
left: 0px;
height: 100%;
background-color: purple;
float: left;
}
#menuright {
width: 100px;
margin-right: 0px;
display: inline-table;
height: 100%;
background-color: green;
float: right;
}
#content {
display: inline-block;
margin-left: 5px;
margin-right: 5px;
height: 100%;
background-color: black;
}
#contop {
top: 0px;
background-color: cyan;
float: top;
margin-bottom: 5px;
}
#conbot {
background-color: red;
float: bottom;
height: 100px;
}
JavaScript
$(document).ready(function () {
$("#container").css("height", $(window).height() - $("#header").outerHeight());
var remaining_space_container = $(window).width() - $("#menuleft").outerWidth() - $("#menuright").outerWidth() - 5 - 5;
$("#contop").css("width", remaining_space_container + "px");
$("#conbot").css("width", remaining_space_container + "px");
var contop_height = $(window).height() - $("#header").outerHeight() - 5 - $("#conbot").outerHeight();
$("#contop").css("height", contop_height + "px");
});