JSFiddle - React, Tailwind, and code Playground

by alga noto

HTML

<div class="wrapper">
    <div id="left">LEFT</div>
    <div id="middle">MIDDLE MIDDLE MIDDLE MIDDLE</div>
</div>
<div id="right">right</div>

CSS

body {
    width:100%;
    padding:0;
    margin:0;
}
#left {
    width:150px;
    background:blue;
    float:left;
    box-sizing:border-box;
    border-right:20px solid white;
    height:100%;
}
.wrapper {
    position:fixed;
    background:green;
    box-sizing:border-box;
    -moz-box-sizing:border-box;
    /* Firefox */
    border: 20px solid white;
    height:100%;
    width:50%;
}
#middle {
    float:right;
    background:blue;
    height:100%;
}
#right {
    height:1400px;
    background:red;
    float:right;
    width:50%;
    box-sizing:border-box;
    -moz-box-sizing:border-box;
    /* Firefox */
    border-right:10px solid white;
    border-top:20px solid white;
}

JavaScript

$('#middle').width(function () {
    return ($(this).parent().width() * 1) - 151;
});


$(window).resize(function () {
$('#middle').width(function () {

    return ($(this).parent().width() * 1) - 151;
});});