Skip to content

Commit 1d09c9e

Browse files
Update leaderboard.html
1 parent 853fd86 commit 1d09c9e

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

leaderboard.html

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -186,52 +186,52 @@
186186
}
187187
.button-container {
188188
padding: 10px; /* Adjust padding for the button container */
189-
text-align: center; /* Center buttons if they wrap */
189+
text-align: center; /* Center buttons if they wrap (though nav buttons should fit) */
190190
}
191191

192-
/* --- Key changes for the Week/Quiz tab buttons (Brain Cache & Mindmash) --- */
192+
/* --- Critical changes for the Week/Quiz tab buttons (Brain Cache & Mindmash) --- */
193193
.tab-nav {
194-
/* Prevents wrapping and enables horizontal scrolling */
195-
flex-wrap: nowrap; /* Forces all items onto a single line */
196-
overflow-x: auto; /* Enables horizontal scrolling when content overflows */
197-
-webkit-overflow-scrolling: touch; /* Improves scrolling on iOS devices */
198-
justify-content: flex-start; /* Align buttons to the start of the scrollable area */
199-
padding: 5px; /* Adjust padding as needed */
200-
width: 100%; /* Ensure it takes full width to enable proper scrolling */
194+
display: flex; /* Ensure flexbox is active */
195+
flex-wrap: nowrap; /* IMP: Force all items onto a single line */
196+
justify-content: space-around; /* Distribute space evenly between items */
197+
overflow: hidden; /* IMP: Hide any overflowing content */
198+
padding: 5px 0; /* Adjust padding if needed, make sure it doesn't push content out */
199+
width: 100%; /* Ensure it takes full width to distribute space */
201200
box-sizing: border-box; /* Include padding in width calculation */
202201
}
203202

204203
.tab-button {
205-
/* Prevent shrinking below content size and maintain some minimum width */
206-
flex-shrink: 0; /* Prevents buttons from shrinking */
207-
min-width: fit-content; /* Allows button to be as wide as its content */
208-
padding: 8px 12px; /* Maintain good padding */
209-
margin: 0 4px; /* Add horizontal spacing between buttons */
210-
font-size: 0.9em; /* Slightly smaller font for more buttons on screen */
204+
flex: 1; /* IMP: Allow buttons to grow and shrink to fill available space evenly */
205+
min-width: 0; /* Allow the button to shrink smaller than its content, but handle overflow */
206+
padding: 8px 4px; /* Reduced padding for more content space */
207+
margin: 0 2px; /* Minimal margin between buttons */
208+
font-size: 0.75em; /* Adjusted font size for fitting. This is the compromise. */
209+
white-space: nowrap; /* IMP: Prevent text from wrapping inside the button */
210+
overflow: hidden; /* IMP: Hide overflowing text */
211+
text-overflow: ellipsis; /* IMP: Show "..." for hidden overflowing text */
212+
box-sizing: border-box; /* Include padding and border in the width calculation */
211213
}
212214

213-
/* Remove any specific first/last child styling if it interferes with uniform appearance in a scrollable row */
214-
.tab-button:first-child {
215-
margin-left: 0; /* No left margin for the first button in the row */
216-
}
217-
.tab-button:last-child {
218-
margin-right: 0; /* No right margin for the last button in the row */
215+
/* Ensure active button styling doesn't break layout */
216+
.tab-button.active {
217+
border-radius: 6px; /* Consistent border radius */
219218
}
220219

221220
/* General mini-window adjustments for small screens */
222221
.mini-window {
223-
width: 95%; /* Give it a bit more width on small screens */
222+
width: 98%; /* Even wider to maximize button space */
224223
margin: 10px auto 30px auto; /* Adjust vertical margins */
225-
padding: 10px; /* Reduce overall padding */
224+
padding: 8px; /* Reduce overall padding */
226225
}
227226

228227
/* Table cell adjustments for readability on small screens */
229228
th, td {
230-
padding: 8px 5px; /* Reduce padding inside table cells */
231-
font-size: 0.9em; /* Slightly smaller text in tables */
229+
padding: 6px 4px; /* Reduce padding inside table cells */
230+
font-size: 0.85em; /* Slightly smaller text in tables for tight fit */
232231
}
233232
table {
234-
min-width: 300px; /* Ensure table doesn't get too squished */
233+
min-width: 100%; /* Ensure table utilizes all available width */
234+
font-size: 0.9em;
235235
}
236236
}
237237
/* Media Queries for Leaderboard specific elements */

0 commit comments

Comments
 (0)