How to increase the font size of the labels in selectbox?


I want to add css like to increase the font size of label in selectbox.

Steps to reproduce

Code snippet:

user_input = st.text_input("Enter some text:")

# Create a dropdown with a list of options
dropdown_option = st.selectbox("Select an option:", ["Option 1", "Option 2", "Option 3"])

# Create radio buttons for a choice
radio_option ="Select one of the options:", ["A", "B", "C"])

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:
How to change the font size of the labels in selectbox and radiobox.

Actual behavior:

after injecting the the css or y using the st.markdown its not working.

Hey @Ruchita_Raut, welcome to our forum :balloon:

You mention you did try something to inject custom CSS, mind sharing it so we can help you understand what went wrong?

Check out that thread, Change Input Text Font Size there are mentions of a solution for selectbox too.

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