JSFiddle - React, Tailwind, and code Playground
HTML
<div id=parent>
<div id=absolute-child>
This is the child
</div>
<div id=child>
This is the child
</div>
</div>
CSS
body {
text-align: center;
}
#parent{
display:inline-block;
position: relative;
text-align: left;
}
#absolute-child {
background-color: red;
color: white;
position: absolute;
left: -50px;
}
#child{
border: solid 1px black;
width: 200px;
height: 200px;
overflow-x: visible;
overflow-y: scroll;
margin-left: auto;
margin-right: auto;
}