Hi! I have a couple of straight-forward questions:
- How to make the labels of the filters bigger?
css = """
<style>
.stTextInput label {
display: block;
text-align: center;
}
</style>
"""
st.markdown(css, unsafe_allow_html=True)
(...)
css = """
<style>
.stSelectbox [data-baseweb="select"] > div > div > div:first-child {
display: block;
width: 100%;
text-align: center;
padding-left: 32px;
}
[data-testid="stVirtualDropdown"] li {
text-align: center;
}
.stSelectbox label {
display: block;
text-align: center;
}
</style>
"""
st.markdown(css, unsafe_allow_html=True)
(...)
css = """
<style>
.stSlider [data-baseweb=slider]{
width: 95%;
margin: 0 auto;
}
.stSlider [data-testid="stTickBar"] {
display: none;
}
.stSlider label {
display: block;
text-align: center;
}
</style>
"""
st.markdown(css, unsafe_allow_html=True)
- How to make the slider go from Min to X+? I want to have the slider, going from Min to 500+
css = """
<style>
.stSlider [data-baseweb=slider]{
width: 95%;
margin: 0 auto;
}
.stSlider [data-testid="stTickBar"] {
display: none;
}
.stSlider label {
display: block;
text-align: center;
}
</style>
"""
st.markdown(css, unsafe_allow_html=True)
min_wages, max_wages = st.sidebar.slider('Wages', min_value=players['Wages (K€)'].min(), max_value=players['Wages (K€)'].max(), value=(default_min_wages, default_max_wages) if not reset_button else (players['Wages (K€)'].min(), players['Wages (K€)'].max()), key="key_wages")
- How to define the location of st.write()? I want to place the dataframe higher in the page.
columns_to_display = ['Rating', 'Player', 'Position', 'Age', 'Value', 'Wages', 'Contract']
html = players[columns_to_display].to_html(index=False)
html = html.replace('<th>', '<th style="text-align: left;">')
st.write(html, unsafe_allow_html=True)
Thanks in advance!