Button Size in Sidebar

Hi @matix42 are these the droids you’re looking for?

streamlit app:

import streamlit as st

def local_css(file_name):
    with open(file_name) as f:
        st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)

local_css("style.css")

with st.sidebar:
    st.button("button sidebar 1")
    st.button("button sidebar longer text")
    st.button("button sidebar 2")
    st.button("button sidebar 3")

st.button("button page 1")
st.button("button longer text page")
st.button("button page 2")
st.button("button page 3")

external css:

section[data-testid="stSidebar"] div.stButton button {
    background-color: brown;
    width: 200px;
}
3 Likes