How to set the background color and text color of "st.header","st.write" etc. and let the text be showed at the left side of input and select box?

1.if we want the change the backgroud color or text color of st.header, st.write,, st.success, st.warning and etc.
how should we set in python program?
2.if we want to let the text be showed with the st.input and st.selectbox within same row(left side of input or select box), how should we set in python program?
thank you.

1 Like

I found a way to change the text background color, use different colors to replace st.header, st.write, st.success, st.warning
code is like this:

def header(url):
     st.markdown(f'<p style="background-color:#0066cc;color:#33ff33;font-size:24px;border-radius:2%;">{url}</p>', unsafe_allow_html=True)


and where you put ‘header(“notice”)’, the background color of text “notice” will change into “#0066cc” text color will be #33ff33 and font size will be 24px.