prasadnu commited on
Commit
47287da
·
1 Parent(s): f725bfe

sidebar fixed

Browse files
Files changed (1) hide show
  1. pages/Semantic_Search.py +18 -18
pages/Semantic_Search.py CHANGED
@@ -50,27 +50,27 @@ st.markdown("""
50
  </style>
51
  """, unsafe_allow_html=True)
52
  st.markdown("""
53
- <style>
54
- /* Fix the entire sidebar so it stays when main content scrolls */
55
- section[data-testid="stSidebar"] {
56
- position: fixed;
57
- top: 0;
58
- left: 0;
59
- height: 100vh;
60
- overflow-y: auto;
61
- z-index: 100;
62
- background-color: #f0f2f6; /* or your theme's sidebar color */
63
- padding-top: 1rem;
64
- }
65
-
66
- /* Prevent main content from hiding behind sidebar */
67
- div[data-testid="stAppViewContainer"] > div:first-child {
68
- margin-left: 21rem; /* Match actual sidebar width */
69
- }
70
- </style>
71
  """, unsafe_allow_html=True)
72
 
73
 
 
74
  #ps = PorterStemmer()
75
 
76
  st.session_state.REGION = 'us-east-1'
 
50
  </style>
51
  """, unsafe_allow_html=True)
52
  st.markdown("""
53
+ <style>
54
+ /* 1. Fix only the inner sidebar user content */
55
+ div[data-testid="stSidebarUserContent"] {
56
+ position: fixed;
57
+ top: 0;
58
+ left: 0;
59
+ height: 100vh;
60
+ overflow-y: auto;
61
+ width: inherit;
62
+ z-index: 999;
63
+ }
64
+
65
+ /* 2. Optional: Prevent double scroll bar from outer sidebar (only if needed) */
66
+ div[data-testid="stSidebarContent"] {
67
+ overflow: hidden !important;
68
+ }
69
+ </style>
 
70
  """, unsafe_allow_html=True)
71
 
72
 
73
+
74
  #ps = PorterStemmer()
75
 
76
  st.session_state.REGION = 'us-east-1'