Update app.py
Browse files
app.py
CHANGED
@@ -2,33 +2,27 @@ import streamlit as st
|
|
2 |
#from streamlit_navigation_bar import st_navbar
|
3 |
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
col.page_link(page, icon=page.icon)
|
27 |
-
|
28 |
-
st.title(f"{current_page.icon} {current_page.title}")
|
29 |
-
|
30 |
-
current_page.run()
|
31 |
-
|
32 |
|
33 |
|
34 |
|
|
|
2 |
#from streamlit_navigation_bar import st_navbar
|
3 |
|
4 |
|
5 |
+
header = st.container()
|
6 |
+
header.title("Here is a sticky header")
|
7 |
+
header.write("""<div class='fixed-header'/>""", unsafe_allow_html=True)
|
8 |
+
|
9 |
+
### Custom CSS for the sticky header
|
10 |
+
st.markdown(
|
11 |
+
"""
|
12 |
+
<style>
|
13 |
+
div[data-testid="stVerticalBlock"] div:has(div.fixed-header) {
|
14 |
+
position: sticky;
|
15 |
+
top: 2.875rem;
|
16 |
+
background-color: white;
|
17 |
+
z-index: 999;
|
18 |
+
}
|
19 |
+
.fixed-header {
|
20 |
+
border-bottom: 1px solid black;
|
21 |
+
}
|
22 |
+
</style>
|
23 |
+
""",
|
24 |
+
unsafe_allow_html=True
|
25 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
|
28 |
|