|
186 | 186 | } |
187 | 187 | .button-container { |
188 | 188 | 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) */ |
190 | 190 | } |
191 | 191 |
|
192 | | - /* --- Key changes for the Week/Quiz tab buttons (Brain Cache & Mindmash) --- */ |
| 192 | + /* --- Critical changes for the Week/Quiz tab buttons (Brain Cache & Mindmash) --- */ |
193 | 193 | .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 */ |
201 | 200 | box-sizing: border-box; /* Include padding in width calculation */ |
202 | 201 | } |
203 | 202 |
|
204 | 203 | .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 */ |
211 | 213 | } |
212 | 214 |
|
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 */ |
219 | 218 | } |
220 | 219 |
|
221 | 220 | /* General mini-window adjustments for small screens */ |
222 | 221 | .mini-window { |
223 | | - width: 95%; /* Give it a bit more width on small screens */ |
| 222 | + width: 98%; /* Even wider to maximize button space */ |
224 | 223 | margin: 10px auto 30px auto; /* Adjust vertical margins */ |
225 | | - padding: 10px; /* Reduce overall padding */ |
| 224 | + padding: 8px; /* Reduce overall padding */ |
226 | 225 | } |
227 | 226 |
|
228 | 227 | /* Table cell adjustments for readability on small screens */ |
229 | 228 | 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 */ |
232 | 231 | } |
233 | 232 | 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; |
235 | 235 | } |
236 | 236 | } |
237 | 237 | /* Media Queries for Leaderboard specific elements */ |
|
0 commit comments