Summary
I am trying to set the layout to wide mode but it’s not working. I have attempted to with placing the setting inside and outside a function. The wide mode works properly if triggered from settings via the burger menu.
Steps to reproduce
Code snippet:
def __init__(file_name):
st.set_page_config(page_title="AppX", page_icon=None,initial_sidebar_state="auto", layout="wide", menu_items={
'Get Help': 'https://www.extremelycoolapp.com/help',
'Report a bug': "https://www.extremelycoolapp.com/bug",
'About': "# This is a header. This is an *extremely* cool app!"
}
)
with open(file_name) as f:
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
__init__("css/style.css")
Expected behavior:
using the above code the page should enter wide mode.
Actual behavior:
Nothing changes page is still in centered mode.
Debug info
- Streamlit version: (1.22.0)
- Python version: (3.9.6)
- OS version: MacOS
- Browser version: Firefox