<!DOCTYPE HTML> <style> #d { overflow:scroll; width:200px; height:200px; background:yellow; transform:translateX(100px); } #d2 { right:0; width:100px; height:100px; background:purple; position:absolute; } </style> <div id="d"> <div id="d2"></div> </div>