Hello, I want to change navigation Sidebar font-size.
(Home, Graph, Activity area)
so I write down code like below, but it isn’t work. Could you help me? Thank you.
(I use python 3.8, streamlit 1.40.0 version)
if name == “main”:
pages = {
"🏠Home" : [st.Page("home.py", title = "Home")],
"📊Graph" : [
st.Page("contents/graph.py", title = "Graph", icon = "◽"),
],
"🎖️Activity" : [
st.Page("contents/activity_1.py", title = "Activity_1", icon = "◽"),
st.Page("contents/activity_2.py", title = "Activity_2", icon = "◽"),
st.Page("contents/activity_3.py", title = "Activity_3", icon = "◽"),
]
}
pg = st.navigation(pages)
pg.run()
st.markdown(
"""
<style>
div[data-testid="stSidebarNav"] > ul[data-testid="stSidebarNavItems"] > header[data-testid="stNavSectionHeader"]> div p{font-size: 20px !important;}
</style>
""", unsafe_allow_html=True
)