My <div>
element has the style property scroll:auto
. Whenever text is added to the <div>
and the content height exceeds the default height, I find myself having to scroll down in order to see the latest lines of text that have been added. What I really want is for the most recent line of text to always be visible without the need for scrolling. If this could be achieved, then I would be able to use scroll:none instead of auto. How can I make this happen? I hope my explanation makes sense.
Update: Although BilgehanKorkmaz's solution initially worked, it eventually stopped working after adding a large amount of text. The scrolling functionality became ineffective. Any suggestions on how to resolve this issue?