HI everyone,
I was wondering how it was possible to add layering/formatting to the app with streamlit. Also if it was possible to do it with a CSS file and if yes, how ?
Thanks a lot,
Anouk
HI everyone,
I was wondering how it was possible to add layering/formatting to the app with streamlit. Also if it was possible to do it with a CSS file and if yes, how ?
Thanks a lot,
Anouk
Hi @Kalmouk. Great question!
For simple HTML styling like setting text color, please note that you an embed a fair amount of html (including style attribute) into Markdown. To use this, please set unsafe_allow_html=True
when using st.markdown()
.
(Edit: This isn’t working for me. We’re looking into this!)
If you are requesting a more general ability to use CSS styling with Streamlit, please feel free to make a feature request with your requirements so that we can prioritize and design this feature.
Thanks for using Streamlit!
Hi everyone,
I have a similar question about formatting, and I would really appreciate any tips or suggestions! I have table with clickable hyperlinks that I’m currently making using this:
st.write(df.to_html(escape=False), unsafe_allow_html=True)
I need to format this table by adding a background color and centering the header row, dropping vertical divider lines between subsequent rows, and changing the font of the text inside the table. Does anyone know how one can do that, while preserving the clickable hyperlinks inside the table?
Thank you so much for your help!
Marina
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.