Cover entire page

Hi Team
using st.set_page_config(layout="wide") still doesn’t cover the entire page. There seem to be some margins. I actually want to avoid that.


You can insert some custom CSS into your application to get rid of those margins. For example, to have 0 margin left or right, you can use the following code:

margins_css = """
        .main > div {
            padding-left: 0rem;
            padding-right: 0rem;

st.markdown(margins_css, unsafe_allow_html=True)

The default value is 5rem, so feel free to adjust the 0s in the code snippet above to whatever you want.

Good luck!

This seems to work on only the padding left and right. I also notice component are embedded as an iframe. I am trying to style a navbar that will be on top of the page.