St.containers bg color change

col1, col2 = st.columns([1.5, 2])

with col1:
	with st.container(height=550, border=True):
		container1()

with col2:
	with st.container(height=550, border=True):
		container2()

with st.container(height=500, border=True):
	container3()

with st.container(height=500, border=True):
	container4()

Is it possible to change the background color and text color of each container?

You could use a styleable container from the streamlit-extras package.
https://arnaudmiribel.github.io/streamlit-extras/extras/stylable_container/


Soon, it will be possible to target individual elements’ style using their key:

2 Likes

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