How do reduce or eliminate the top margin for streamlit version 1.38?

In streamlit 1.25,the main content area can be changed by the following,
st.markdown(" div[class^=‘block-container’] { padding-top: 2rem; } ", unsafe_allow_html=True)
In streamlit version 1.38, how to get the selectors?

    st.markdown(
        r"""
        <style>
        .stAppViewBlockContainer {
               padding-top: 0rem;
            }
        </style>
        """, unsafe_allow_html=True
    )

A good video to find the css :slight_smile:

1 Like

For the latest version of streamlit, I had to do this instead

st.markdown("""
<style>
header.stAppHeader {
    background-color: transparent;
}
section.stMain .block-container {
    padding-top: 0rem;
    z-index: 1;
}
</style>""", unsafe_allow_html=True)