Update app.py
Browse files
app.py
CHANGED
@@ -9,14 +9,15 @@ st.sidebar.text("Demo by JA-RAD")
|
|
9 |
st.markdown(
|
10 |
"""
|
11 |
<style>
|
12 |
-
|
13 |
position: fixed;
|
14 |
top: 0px;
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
20 |
}
|
21 |
</style>
|
22 |
""",
|
@@ -25,10 +26,9 @@ st.markdown(
|
|
25 |
|
26 |
st.title("My Sticky Header App")
|
27 |
|
28 |
-
st.write("Scroll down to see the header
|
29 |
for i in range(50):
|
30 |
-
|
31 |
-
|
32 |
|
33 |
|
34 |
# --- PAGE SETUP ---
|
|
|
9 |
st.markdown(
|
10 |
"""
|
11 |
<style>
|
12 |
+
.streamlit-expander header:first-child {
|
13 |
position: fixed;
|
14 |
top: 0px;
|
15 |
+
left: 0px;
|
16 |
+
right: 0px;
|
17 |
+
z-index: 9999;
|
18 |
+
background-color: rgba(255, 255, 255, 0.95); /* Optional background */
|
19 |
+
padding: 10px 0; /* Optional padding */
|
20 |
+
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); /* Optional shadow */
|
21 |
}
|
22 |
</style>
|
23 |
""",
|
|
|
26 |
|
27 |
st.title("My Sticky Header App")
|
28 |
|
29 |
+
st.write("Scroll down to see if the header remains at the top on Hugging Face!")
|
30 |
for i in range(50):
|
31 |
+
sst.write(f"Some more content here: {i}")
|
|
|
32 |
|
33 |
|
34 |
# --- PAGE SETUP ---
|