I want to reduce the image or the border in st.file_uploader which will be displayed by default in streamlit app .Tried using CSS but didnât work as expected How to handle this ? Any thoughts ?
Could you post the CSS you tried to use?
Thanks
css = âââ [data-testid=âstFileUploaderâ] { width: max-content; } [data-testid=âstFileUploaderâ] section { padding: 0; float: left; } [data-testid=âstFileUploaderâ] section > input + div { display: none; } [data-testid=âstFileUploaderâ] section + div { float: right; padding-top: 0; } âââ
file = st.markdown(css, unsafe_allow_html=True)
file = st.file_uploader(âDrop your CSV or Excel file hereâ, type=[âcsvâ, âxlsxâ])
load_data = st.button(âSUBMITâ)
This just shows the BROWSE FILES and the lable
Just wrap your CSS in a tag and you should be fine.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.