I want to set the scrollbar position of a block to specific coordinates when the page is loaded.
The closest thing I found to this is the
window.scrollTo
method in JavaScript, which sets the scrollbar positions of the horizontal and vertical scrollbars of the whole page in the browser. This script can then be run when the page is loaded.
I want to do the same with a block like this:
<div>
<p> lots of text </p>
<div>
<style>
div {
overflow: scroll;
}
</style>