css auto scroll to bottom code example
Example 1: automatically scroll to bottom of page
window.scrollTo(0,document.body.scrollHeight);
Example 2: css scrollbar position to bottom
document.getElementsByClassName('className')[0].scrollTop = document.getElementsByClassName('className')[0].scrollHeight;