Hello @qxlsz,
Actuallly, as hinted by @nthmost, you CAN align HTML through Markdown :
import streamlit as st
st.markdown("<h1 style='text-align: center; color: red;'>Some title</h1>", unsafe_allow_html=True)
…but unsafe_allow_html
is probably going to be deprecated soon, so we can’t count on this.
I tried adding a CSS file in the static
folder where Streamlit is installed but no luck (EDIT : but it can work if done correctly !)
There’s a feature in RISE that allows to inject custom CSS classes over RISE CSS but they allow display of HTML so that makes it easier. I would be interested in custom CSS but maybe it would be too cumbersome to add a list of editable CSS classes as arg of each Streamlit Python method and pointing them to our external CSS file ?
So if you really want to edit CSS, for now the way to go would be to edit the SCSS in Streamlit source code and rebuild the frontend part.
EDIT : well actually someone did load it’s custom CSS and it’s easy. You can follow the discussion to see how it goes .