Skip to content

Commit 2a8b697

Browse files
committed
MATH-SPRINT-GAME
1 parent f753168 commit 2a8b697

2 files changed

Lines changed: 26 additions & 6 deletions

File tree

Source Code/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313

1414
<head>
1515
<meta charset="UTF-8">
16-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
16+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
17+
<meta name="apple-mobile-web-app-capable" content="yes">
1718
<!--
1819
Site Metadata checks:
1920
Standardized Title and Meta Author tags for Project Attribution.

Source Code/style.css

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ body {
4545
-moz-user-select: none;
4646
-ms-user-select: none;
4747
user-select: none;
48-
height: 100vh;
48+
user-select: none;
49+
height: 100dvh;
4950
background: #f0f8ff;
5051
/* AliceBlue base */
5152
background-image: url("img/background_sprint.png");
@@ -741,12 +742,27 @@ button:active {
741742
@media screen and (max-width: 600px) {
742743
.game-container {
743744
width: 100%;
744-
height: 100vh;
745-
max-height: 100vh;
745+
height: 100dvh;
746+
max-height: 100dvh;
746747
border-radius: 0;
747748
margin-top: 0;
748749
border: none;
749750
box-shadow: none;
751+
display: flex;
752+
flex-direction: column;
753+
overflow: hidden;
754+
/* Keep hidden, handle scrolling internally */
755+
}
756+
757+
/* Make the card header/footer fixed height, and middle scrollable */
758+
.card {
759+
flex: 1;
760+
overflow: hidden;
761+
/* Contain children */
762+
display: flex;
763+
flex-direction: column;
764+
min-height: 0;
765+
/* Crucial for flex scroll */
750766
}
751767

752768
.header {
@@ -776,12 +792,15 @@ button:active {
776792

777793
/* Selection Page Adjustments */
778794
.selection-container {
795+
flex: 1;
796+
/* Fill available space */
779797
justify-content: flex-start;
780-
/* Start from top */
781798
gap: 10px;
782799
padding-top: 10px;
783800
overflow-y: auto;
784-
/* Allow scroll if needed */
801+
/* Scrollable content area */
802+
min-height: 0;
803+
/* Enable scroll */
785804
}
786805

787806
.radio-container {

0 commit comments

Comments
 (0)