I have a container with a scrollbar containing various contents, functioning as a widget. Upon initialization, I position the scrollbar at the bottom. My aim is to ensure that regardless of any changes in the parent element or its placement elsewhere, the scrollbar remains at the bottom for optimal content visibility.
While I am aware that JavaScript can achieve this, I prefer the element to handle it autonomously without requiring specific actions to trigger events.
Implementing setInterval
or setTimeout
seems resource-intensive.
Hence, I am exploring options using CSS.
Any suggestions?