hi all:
I am trying to change the font-size of form_submit_button
analyze = st.form_submit_button("Analyze", use_container_width=True)
I using the css style below:
st.markdown(
"""
<style>
.stFormSubmitButton>button {
font-size:20px !important;
background-color: #02ab21;
color: black;
margin: 0 auto;
height: 100px;
}
.big-font {
font-size:20px !important;
}
.stFormSubmitButton>button:hover {
background-color: purple;
color: black;
}
</style>
""",
unsafe_allow_html=True
)
all parameters were accepted except the font-size。but when I add some strange string words into label, font-size start work
analyze = st.form_submit_button("<p>Analyze", use_container_width=True)
demo is runing on streamlit_app (github.dev)
complete demo code:
import streamlit as st
st.title("🎈 My new app")
st.markdown(
"""
<style>
.stFormSubmitButton>button {
font-size:40px;
background-color: #02ab21;
color: black;
margin: 0 auto;
height: 100px;
}
.stFormSubmitButton>button:hover {
background-color: purple;
color: black;
}
</style>
""",
unsafe_allow_html=True
)
with st.form("test"):
st.form_submit_button('testString')
st.form_submit_button('<p>testString')
- python version:3.11.10
- streamlit version:1.39.0
if anyone can help that would be appreciated.