I want to change the width of some specific selectbox in the page. Any solution from the community appreciated.
Hi, you can do the following:
- Create a set of columns (using st.columns) for that row where your selectbox currently lies. Refer Streamlit docs. The column specs will be list of numbers and not a single integer. That way you can decide on the number of columns on that row and their relative width to each other.
- Place your selectbox in one of those columns (depending on how you want to horizontally position it) on that row.
- The width of the selectbox with now be restricted to the column width (in which it is placed).