JSFiddle - React, Tailwind, and code Playground
HTML
<div id="header">
<div class="container">
header
</div>
</div>
<div id="content" class="container">
<div class="inner">
content
</div>
</div>
<div id="sidebar">
<div class="container">
<div class="inner">
sidebar
</div>
</div>
</div>
CSS
body {
padding: 0px;
}
.container {
margin: 0px auto;
position: relative;
width: 500px;
}
#header {
left: 0px;
position: fixed;
top: 0px;
width: 100%;
z-index: 1000;
}
#header .container {
background: blue;
height: 100px;
}
#content {
background: green;
height: 1500px;
margin-top: 100px;
}
#content .inner {
margin-right: 200px;
}
#sidebar {
left: 0px;
position: fixed;
top: 100px;
width: 100%;
z-index: 1000;
}
#sidebar .inner {
background: red;
height: 200px;
position: absolute;
right: 0px;
top: 0px;
width: 200px;
}