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
)
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)