JSFiddle - React, Tailwind, and code Playground
by dingen2010
HTML
<div class="flex-wrapper">
<div class="flex">
<div class="sidebar">
<ul>
<li>Home</li>
<li>About</li>
<li>Contacts</li>
<li>Monkeys</li>
<lI>Pigeons</lI>
</ul>
</div>
<div class="content">
<div>
<p>
We have got the best monkeys in entire europe.
</p>
<p>
We have also got some really good pigeons.
</p>
<p>
One pigeon scored more than 1500 in 2016 SAT exams.
</p>
<p>
The monkey was quite jealous of him to be honest.
</p>
<p>
But they are still besties so far... and will be forever
</p>
</div>
</div>
</div>
</div>
CSS
*{
box-sizing: border-box;
}
.flex-wrapper{
position: absolute;
top: 0;
left: 0;
right: 0;
width: 100%;
height: 100%;
max-width: 600px;
margin: auto;
}
.flex{
display: flex;
flex-direction: row;
border: 1px solid green;
height: 100%;
}
.flex > *{
border: 1px solid green;
}
.sidebar{
width: 200px;
}
.content{
flex: 1;
overflow-y: auto;
}
.content p{
font-size: 48px;
}