St.success customization problems

Hi, is there any way to change the font and background color, and opacity of st.success ? Because anything doesn’t seem with default colors.

the community or our support engineers for answers to questions.

Hi @murat_tasci , maybe you can use st.markdown and styles to write your own st.success, thereby deciding all the cosmetic parameters of the output (font, colour, etc.)

Just search the same on the forum.


Hi @Shawn_Pereira , I tried the below code in the function : (some parts are missing like multi-select, date input, button, etc. but the main structure is as follows.) The code works but it affects the background color of the footer of my web application, button section, and multi-select sections’ background color too. How can I solve this? I only want to change st.success’s background color.

import streamlit as st
def main(): 
 with st.container(): 
  .element-container {
      background-color: blue;
      opacity: 1;
  .st-b7 {
      color: white;
  .css-nlntq9 {
      font-family: Source Sans Pro;
  ''', unsafe_allow_html=True)
if __name__=='__main__':

I don’t know why this happens:

Hi @murat_tasci

Since I get copy-paste errors here, I have uploaded a pix of the code and the result for a st.success kind of display. Please change the parameters as desired.

Here you go:


Thank you for your help.

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