Edit in JSFiddle

<div class="parent">
  <div class="child-1"> </div>
  <div class="child-2">
   <div class="absolute-block"></div>
  </div>
</div>
.parent {
display: flex;
flex-direction: row;
outline:1px solid red;
}

.child-1 {
flex-grow: 1;
}

.child-2 {
position: relative;
width: 50px;
overflow-x: auto;
}

.absolute-block {
position: absolute;
top: -20px
right: 40px;
z-index: 1000;
}