Page scrolling on opening and reload


Recently I faced an issue when my page scrolls down to the bottom istead of starting with no scoll. Due to this issue, I am not even able to see my name and avatar, as you can see in this video.
I searched for a possible solution but couldn’t find anything.

PS.: I looked at this similar issue (link to access) but it has no replies nor visible solution.

Naomi Lago

I’m having the same issue - following this tutorial: GitHub - Sven-Bo/digital-resume-template-streamlit

Yeah, that’s the tutorial I’m following. I even opened an issue on Github for this occasion.

It’s been two days…

I have the same issue (with another project). Have you already fixed the bug?

1 Like

Unfortunately not… Streamlit kind of ignores our post about this specific issue.
There are more people with the same thing but also no answeres

From st.title documentation:

Each document should have a single st.title(), although this is not enforced.

The issue I think is that every st.write("#") in that app is interpreted as a st.markdown("#"), which is equivalent to adding an empty st.title(""), which is equivalent to an empty <h1> html tag. But there should be an unique title in the app as streamlit looks for that beginning.

In streamlit, the header levels follow something like:

Streamlit HTML Markdown
st.title <h1> #
st.header <h2> ##
st.subheader <h3> ###

Not sure why you’d need those empty title anchors (i.e., the st.write("#") before each section, maybe to add some vertical whitespace?) but removing them should fix your issue.

1 Like

Perfect solution! Having multiple titles is the issue.

To add white space it’s therefore better to define a helper function like this:

def V_SPACE(lines):
    for _ in range(lines):