Can not set page width in streamlit 1.5.0?

Hi:
I use the max_width() function to set page width and it worked. But after I update to streamlit 1.4 or 1.5, this code does not work properly.
Thanks.
Dave

Same here!
Is this a bug or did the parameter name change?
Best,
LeChuck

It’s important to realize that the linked code is CSS, which is dynamically created by React inside of Streamlit. So it’s not guaranteed to be stable across versions of Streamlit or even within runs.

So if it stopped working, it’s likely that one or more of .reportview-container .main .block-container is now different.

def _max_width_():
    max_width_str = f"max-width: 2000px;"
    st.markdown(
        f"""
    <style>
    .reportview-container .main .block-container{{
        {max_width_str}
    }}
    </style>    
    """,
        unsafe_allow_html=True,
    )

Best,
Randy