Update app.py
Browse files
app.py
CHANGED
@@ -1,21 +1,27 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
#
|
4 |
st.markdown("""
|
5 |
<style>
|
6 |
-
|
7 |
-
|
8 |
-
padding-bottom: 0rem;
|
9 |
-
}
|
10 |
-
header {
|
11 |
position: fixed;
|
12 |
-
top:
|
13 |
-
|
14 |
-
|
|
|
15 |
background-color: white;
|
16 |
}
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
</style>
|
21 |
""", unsafe_allow_html=True)
|
@@ -24,7 +30,6 @@ st.markdown("""
|
|
24 |
|
25 |
|
26 |
|
27 |
-
|
28 |
# --- SHARED ON ALL PAGES ---
|
29 |
st.logo(image="images/menu_book_60dp_75FBFD.png")
|
30 |
st.sidebar.title("SBS V2.0 mapper")
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
# More specific CSS targeting for sticky header
|
4 |
st.markdown("""
|
5 |
<style>
|
6 |
+
/* Target the main header container */
|
7 |
+
[data-testid="stHeader"] {
|
|
|
|
|
|
|
8 |
position: fixed;
|
9 |
+
top: 0px;
|
10 |
+
left: 0px;
|
11 |
+
right: 0px;
|
12 |
+
z-index: 1000;
|
13 |
background-color: white;
|
14 |
}
|
15 |
+
|
16 |
+
/* Add padding to the main content to prevent it from being hidden under the header */
|
17 |
+
[data-testid="stAppViewContainer"] > .main {
|
18 |
+
padding-top: 3rem;
|
19 |
+
}
|
20 |
+
|
21 |
+
/* Ensure the sidebar isn't affected by the fixed header */
|
22 |
+
[data-testid="stSidebar"] {
|
23 |
+
z-index: 999;
|
24 |
+
padding-top: 3rem;
|
25 |
}
|
26 |
</style>
|
27 |
""", unsafe_allow_html=True)
|
|
|
30 |
|
31 |
|
32 |
|
|
|
33 |
# --- SHARED ON ALL PAGES ---
|
34 |
st.logo(image="images/menu_book_60dp_75FBFD.png")
|
35 |
st.sidebar.title("SBS V2.0 mapper")
|