Skip to content

Commit 853fd86

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

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

leaderboard.html

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,24 +191,31 @@
191191

192192
/* --- Key changes for the Week/Quiz tab buttons (Brain Cache & Mindmash) --- */
193193
.tab-nav {
194-
flex-wrap: wrap; /* Allow buttons to wrap to the next line */
195-
justify-content: center; /* Center the wrapped buttons */
196-
padding: 5px 0; /* Adjust padding if needed, make sure it doesn't push content out */
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 */
201+
box-sizing: border-box; /* Include padding in width calculation */
197202
}
198203

199204
.tab-button {
200-
flex: 0 0 48%; /* Each button takes up slightly less than half the width, allowing two per row */
201-
max-width: 48%; /* Ensure it doesn't grow beyond this */
202-
box-sizing: border-box; /* Include padding and border in the width calculation */
203-
margin: 4px 1%; /* Small margin between and around buttons for spacing */
204-
padding: 8px 5px; /* Slightly reduce internal padding */
205-
font-size: 0.85em; /* Slightly smaller font for readability */
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 */
206211
}
207212

208-
/* Override the first/last child border-radius if they conflict with wrapping */
209-
.tab-button:first-child,
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+
}
210217
.tab-button:last-child {
211-
border-radius: 6px; /* Apply consistent border-radius when wrapping */
218+
margin-right: 0; /* No right margin for the last button in the row */
212219
}
213220

214221
/* General mini-window adjustments for small screens */

0 commit comments

Comments
 (0)