Skip to content

Commit 19a9eac

Browse files
committed
Last changes to check mobile version
1 parent 750ad96 commit 19a9eac

File tree

3 files changed

+94
-7
lines changed

3 files changed

+94
-7
lines changed

css/style.css

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ body {
186186
border-top: 2px solid rgb(235, 235, 235);
187187
margin-left: 90px;
188188
}
189+
.form-line-mobile{
190+
display: none;
191+
}
192+
.mobile-img{
193+
display: none;
194+
}
189195

190196
label {
191197
font-weight: bold;
@@ -219,11 +225,13 @@ input[type="radio"]:checked {
219225

220226
/* none-display for desktop size */
221227

222-
.hamburger-menu {
228+
#hamburger-menu {
223229
display: none;
224230
}
225231

232+
226233
@media screen and (max-width: 540px) {
234+
/* MEET KARMA PAGE */
227235
.nav-desktop {
228236
display: none;
229237
}
@@ -243,15 +251,18 @@ input[type="radio"]:checked {
243251
background-color: #000;
244252
border-radius: 5px;
245253
}
246-
/* #menu {
254+
/* #menu {
247255
display: none;
248256
} */
249257

250258
/* main */
251-
.icons{
259+
.icons {
252260
display: flex;
253261
flex-direction: column;
254262
gap: 40px;
255263
border-bottom: 2px solid rgb(223, 223, 223);
256264
}
265+
266+
/* STORE PAGE */
267+
257268
}

store-mobile.css

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
@media screen and (max-width: 540px) {
2+
.nav-list {
3+
display: none;
4+
}
5+
6+
.store-main {
7+
display: flex;
8+
flex-direction: column;
9+
}
10+
11+
.form-group-inline {
12+
display: flex;
13+
flex-direction: column;
14+
}
15+
.city-postcode {
16+
display: flex;
17+
flex-direction: column;
18+
}
19+
#postcode {
20+
width: 120px;
21+
}
22+
.orange-grey {
23+
display: grid;
24+
grid-template-columns: 30px 160px;
25+
grid-template-rows: repeat(2, 1fr);
26+
grid-template-areas:
27+
"a c"
28+
"b d";
29+
}
30+
#color1 {
31+
grid-area: a;
32+
}
33+
#color2 {
34+
grid-area: b;
35+
}
36+
.color1-orange {
37+
grid-area: c;
38+
}
39+
.color1-grey {
40+
grid-area: d;
41+
}
42+
.form-line {
43+
display: none;
44+
}
45+
.form-line-mobile {
46+
border-bottom: 2px solid grey;
47+
margin-top: 10px;
48+
}
49+
50+
.mobile-img {
51+
display: inline;
52+
background-position: center; /* Center the image */
53+
background-repeat: no-repeat; /* Do not repeat the image */
54+
background-size: cover; /* Resize the background image to cover the entire container */
55+
margin-top: 80px;
56+
margin-bottom: 50px;
57+
}
58+
59+
footer {
60+
border-top: 2px solid rgb(223, 221, 221);
61+
margin-right: 30px;
62+
margin-left: 30px;
63+
}
64+
.form-button {
65+
margin-left: 70px;
66+
margin-top: 30px;
67+
}
68+
}

store.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<title>Document</title>
88
<link rel="stylesheet" href="./css/normalize.css" />
99
<link rel="stylesheet" href="./css/style.css">
10+
<link rel="stylesheet" href="./store-mobile.css">
1011
</head>
1112
<header class="header">
1213
<img src="./img/karma-logo.svg" alt="" style="height: 50px" />
@@ -22,6 +23,11 @@
2223
<li class="nav-item"><a href="#">Login</a></li>
2324
</ul>
2425
</nav>
26+
<button id="hamburger-menu">
27+
<span></span>
28+
<span></span>
29+
<span></span>
30+
</button>
2531
</header>
2632

2733
<!-- MAIN -->
@@ -75,9 +81,9 @@ <h1 class="form-h2">Order your Karma wifi device today!</h1>
7581
<label for="color">Select a color</label>
7682
<div class="orange-grey">
7783
<input type="radio" id="color1" name="color" value="orange" />
78-
<label for="color1">Karma orange</label>
84+
<label for="color1" class="color1-orange">Karma orange</label>
7985
<input type="radio" id="color2" name="color" value="grey" />
80-
<label for="color2">Space grey</label>
86+
<label for="color2" class="color1-grey">Space grey</label>
8187
</div>
8288
</div>
8389

@@ -90,10 +96,12 @@ <h1 class="form-h2">Order your Karma wifi device today!</h1>
9096
</form>
9197

9298
</div>
93-
<div class="background-img">
99+
<div class="background-img"></div>
94100

95-
</div>
96101
<div class="form-line"></div>
102+
<div class="mobile-img"><img src="./level-2/store-image_by-andrew-neel-unsplash.jpg" alt="" width="500px"></div>
103+
<div class="form-line-mobile"></div>
104+
97105
</main>
98106

99107
<!-- FOOTER -->

0 commit comments

Comments
 (0)