<div style="overflow: scroll; width: 400px; height: 400px;"> <div style="width: 200px; height: 1000vh; background: blue;"> </div> <div style="background: yellow; position: absolute; top: 0; left: 0; bottom: 0; right: 0;"> </div> </div>