Skip to content

Commit 250c5a8

Browse files
author
Coding Cactus
committed
responsive fixes
1 parent c482bc4 commit 250c5a8

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

index.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
</head>
1818
<body>
1919
<div id="background"></div>
20-
<h1>Slidey</h1>
21-
<h5>Slide the tiles to correct the picture!</h5>
2220

2321
<main>
22+
<h1>Slidey</h1>
23+
<h5>Slide the tiles to correct the picture!</h5>
24+
2425
<div id="scores"><!--
2526
--><div id="current"><!--
2627
--><p>Moves: <span id="moves">0</span></p><!--

style.css

+14-3
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ h1 { font-size: 5vh; }
1111
h5 { font-size: 2vh; }
1212
h1, h5 { text-align: center; }
1313

14-
h1, h5, #scores {
14+
h1, h5, #scores, #mobile-options h4, #mobile-options label {
1515
color: #fff;
1616
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
1717
}
18+
#mobile-options label { text-shadow: -0.5px -0.5px 0 #000, 0.5px -0.5px 0 #000, -0.5px 0.5px 0 #000, 0.5px 0.5px 0 #000; }
19+
#mobile-options .img-label { font-size: 18px; }
1820

1921
main {
2022
width: max-content;
2123
margin: auto;
2224
--size: 65vh;
25+
padding-top: 20px;
2326
}
2427

2528
#board {
@@ -182,7 +185,7 @@ input[type="checkbox"], input[type="radio"] {
182185
margin-right: 3px;
183186
vertical-align: middle;
184187
border-radius: 25%;
185-
background-color: #ccc;
188+
background-color: #ddd;
186189
cursor: pointer;
187190
}
188191

@@ -255,13 +258,21 @@ input[type="radio"] {
255258
#mobile-options { display: none; }
256259

257260
@media screen and (max-width: 1000px) {
261+
main { --size: 60vh; }
262+
.img-label { font-size: calc(var(--size) / 45)}
263+
}
264+
265+
@media screen and (max-width: 600px) {
258266
h1 { font-size: 30px; }
259267
h5 { font-size: 10px; }
260268

261269
#mobile-options { display: block; }
262270
#image-select, #settings { display: none; }
263271

264-
main { --size: 95vw; }
272+
main {
273+
--size: 95vw;
274+
padding-bottom: calc((100vh - var(--size)) / 2 - 75px);
275+
}
265276

266277
#scores { width: 100%; }
267278

0 commit comments

Comments
 (0)