JSFiddle - React, Tailwind, and code Playground
HTML
<div id="container1">
<div id="container2">hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
<br/>here
<br/>hello
<br/>I
<br/>am
...
CSS
* {
margin:0;
}
#container1 {
height: 100%;
width: 100%;
border: 1px solid green;
overflow: hidden;
position: relative;
}
#container2 {
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: -15px;
border: 1px solid blue;
overflow: auto;
}
html, body {
height: 99%;
border: 1px solid red;
overflow:hidden;
}