Keep menu without header?

HI! Is it possible to remove the red β€œbar” and keep only the menu? I know that with header {{visibility:hidden;}} , both the bar and the menu are removed but I would like to keep the menu, how do I do it?

Hi @valeriofiorentini

You can use CSS customization to hide the red gradient bar at the top and still retain the hamburger menu by using display: none; for [data-testid="stDecoration"].

Consider the following default app:

import streamlit as st

st.title('🎈 Test')

which produces the following app:

With the CSS implementation using the following:

import streamlit as st

st.markdown("""
<style>
	[data-testid="stDecoration"] {
		display: none;
	}

</style>""",
unsafe_allow_html=True)

st.title('🎈 Test')

the resulting app no longer has the red gradient bar but still retaining the hamburger menu:

Hope this helps!

Best regards,
Chanin

1 Like

Hi @dataprofessor

Thanks, it worked!

Best regards,
Valerio

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