JSFiddle - React, Tailwind, and code Playground
by ruisoftware
HTML
<div id="overflowed">
You can see that both scroll bars are visible, and content is overflowing to left and top<br />
You can see that both scroll bars are visible, and content is overflowing to left and top<br />
You can see that both scroll bars are visible, and content is overflowing to left and top<br />
You can see that both scroll bars are visible, and content is overflowing to left and top<br />
You can see that both scroll bars are visible, and content is overflowing to left and top<br />
</div>
CSS
#overflowed {
width: 200px;
height: 100px;
overflow: auto;
white-space: nowrap;
}
JavaScript
// I want content to overflow to the left and to the top
var $container = $("#overflowed");
$container.
scrollLeft($container[0].scrollWidth).
scrollTop($container[0].scrollHeight);