There is a large blank placeholder at the top of the page for the main content, I want my content to be displayed from the top of the page, I tried using the following code to hide the stHeader element but it doesn’t work, I don’t know much about CSS, is it my element selection is wrong? Here’s my code:
st.markdown(
“”"
.stApp [data-testid=“stHeader”] {
display: none;
}
“”",
unsafe_allow_html=True,
)
Not sure if it’s what you are looking for but for me, it’s work with some css :
hide_main_content_style = """
<style>
.st-emotion-cache-1jicfl2{
padding: 0rem 1rem 10rem;
}
</style>
"""
st.markdown(hide_main_content_style, unsafe_allow_html=True)
you can adjust the first (0rem)
(i thing you need to find the correct css for your element instead of st-emotion-cache-1jicfl2)