Select box width sizing along with text inputs


Hello guys, I am newbie to Streamlit and maybe my question is too simple. I have 9 columns. The 1st column has “selectbox”, where feed ingredients are listed and the rest of them are text inputs. I would like to make “selectbox” wider so that an ingredient can be displayed easily upon selection and I would like to make the other “text_inputs” narrower (price, cost etc. do not need to be that wide). Is there are an easy workaround to this?

Thanks

Refer st.columns in the documentation. You can change the width of a column relative to another column. The following example is for 2 columns; you can suitably modify it for 9 cols:
col1, col2 = st.columns([3, 1])

Hope that helps :slight_smile:

1 Like

Thank you!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.