georad commited on
Commit
27961da
·
verified ·
1 Parent(s): b5287de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -9,14 +9,15 @@ st.sidebar.text("Demo by JA-RAD")
9
  st.markdown(
10
  """
11
  <style>
12
- div[data-testid="stToolbar"] {
13
  position: fixed;
14
  top: 0px;
15
- width: 100%;
16
- z-index: 9999; /* Ensure it stays on top of other elements */
17
- background-color: rgba(255, 255, 255, 0.95); /* Optional: Add a background color and transparency */
18
- padding: 10px 0; /* Optional: Add some padding */
19
- box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); /* Optional: Add a subtle shadow */
 
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 remain at the top!")
29
  for i in range(50):
30
- st.write(f"Some content here: {i}")
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 ---