# How can I use an auto scroll to the bottom of the page?

**URL:** <https://discuss.streamlit.io/t/how-can-i-use-an-auto-scroll-to-the-bottom-of-the-page/39650>\
**Category:** Using Streamlit\
**Created:** [March 19, 2023, 6:22pm UTC](https://discuss.streamlit.io/t/how-can-i-use-an-auto-scroll-to-the-bottom-of-the-page/39650 "2023-03-19T18:22:40Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![evh](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/evh/32/31352_2.png) [@evh](https://discuss.streamlit.io/u/evh)\
**Post date:** [August 31, 2023, 2:41pm UTC](https://discuss.streamlit.io/t/how-can-i-use-an-auto-scroll-to-the-bottom-of-the-page/39650/10 "2023-08-31T14:41:57Z")

</div>

> [@Pieter\_Doevendans](#):
>
> ```auto
> st.markdown(
> """
> <script>
> var element = document.getElementById("end-of-chat");
> element.scrollIntoView({behavior: "smooth"});
> </script>
> """,
> unsafe_allow_html=True,
> )
> 
> ```

Did you achieve it? I tried all examples I can find and none work. Crazy that such a functionality is not implemented in chat\_messages.

---

_[View the full topic](https://discuss.streamlit.io/t/how-can-i-use-an-auto-scroll-to-the-bottom-of-the-page/39650)._
