JSFiddle - React, Tailwind, and code Playground
HTML
<div class="outerwrapper">
<div class="header_left"> </div>
<div class="header_right"> </div>
<div class="left_column"> </div>
<div class="middle_top"> </div>
<div class="menu_toggle"><a href="#" id="menu_toggle">toggle</a></div>
<div class="main_window"> </div>
<div class="menu"> </div>
</div>
CSS
html,body
{
height: 100%;
margin: 0;
padding: 0;
}
div
{
display: block;
float: left;
position: relative;
overflow: hidden;
}
.outerwrapper
{
width: 100%;
min-height: 100%;
height: 100%;
}
.header_left
{
width: 80%;
height: 20%;
background: #f00;
}
.header_right
{
width: 20%;
height: 20%;
background: #0f0;
}
.left_column
{
width: 20%;
min-height: 80%;
height: 80%;
background: #00f;
}
.middle_top
{
width: 60%;
height: 10%;
background: #0f0;
}
.menu_toggle
{
width: 20%;
height: 10%;
background: #f00;
}
.main_window
{
width: 60%;
height: 70%;
min-height: 70%;
background: #f00;
overflow: auto;
}
.menu
{
width: 20%;
height: 70%;
min-height: 70%;
background: #00f;
}
JavaScript
$(document).ready(function(){
$("#menu_toggle").toggle(function(){
$(".menu").css("width", "0%");
$(".main_window").css("width","80%");
return false;
},function(){
$(".main_window").css("width","60%");
$(".menu").css("width", "20%");
return false;
});
});