<!DOCTYPE html> <script> function scroll() { document.getElementsByTagName("div")[0].scrollTop = 200; } </script> <body onload="scroll()"> <div style="height: 300px; width: -moz-min-content; font-size: 0; line-height: 0; border: 1px solid gray; overflow: scroll;"> <div style="height: 100%; width: 100px; border: 50px solid blue;">