Skip to content

Commit 2fd90d2

Browse files
committed
UI Bugs fixed
- Added scrolling. - Fixed stretched looking images (except the last one, please check the recommendation comment in the html file) - Cursor now switches to pointer when hovering over any clickable item. - Fixed UI breaking at < 1220px width.
1 parent d63c435 commit 2fd90d2

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<body>
1717
<nav>
1818
<div class="sec-1">
19-
<h3 href="index.html"><span>Code</span>Shop</h3>
19+
<a href="index.html"><h3><span>Code</span>Shop</h3></a>
2020
</div>
2121
<div class="sec-2">
2222
<ul>
@@ -167,6 +167,7 @@ <h4>Iphone 14 Pro Max </h4>
167167
</div>
168168
</div>
169169

170+
<!-- Suggestion: use images with same height and width then remove the height settings in swiper's css. This will improve consistency in UI and eliminate the stretched image you problem see now. -->
170171
<!-- Swiper -->
171172
<div class="swiper">
172173
<!-- Additional required wrapper -->

style.css

+25-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
margin: 0;
33
padding: 0;
44
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
5+
scroll-behavior: smooth;
6+
box-sizing: border-box;
7+
}
8+
9+
:root{
10+
--mail-part-1-input-height: 6vh;
511
}
612

713
body{
@@ -75,6 +81,7 @@ nav:nth-child(2) {
7581
}
7682

7783
.sec-3 ul li {
84+
cursor: pointer;
7885
padding: 1vh 3vw;
7986
}
8087

@@ -86,7 +93,7 @@ nav:nth-child(2) {
8693

8794
.hero-sec img {
8895
width: 100%;
89-
height: 85vh;
96+
/* height: 85vh; */
9097
}
9198

9299

@@ -285,14 +292,15 @@ nav:nth-child(2) {
285292

286293
.banner img {
287294
width: 50vw;
288-
height: 40vh;
295+
/* height: 40vh; */
289296
}
290297

291298

292299
/* this is swiper */
293300
.swiper {
294301
width: 58vw;
295302
height: 55vh;
303+
/* height: min-content; */
296304
margin: 5vh 0;
297305
}
298306

@@ -323,7 +331,7 @@ section {
323331
.mail-part-1 input {
324332
width: 35vw;
325333
border-radius: 5px;
326-
height: 6vh;
334+
height: var(--mail-part-1-input-height);
327335
background-color: transparent;
328336
padding: 0.5em;
329337
color: white;
@@ -333,7 +341,7 @@ section {
333341
.mail-part-1 button {
334342
margin: 1em;
335343
width: 6em;
336-
height: 4vh;
344+
height: var(--mail-part-1-input-height);
337345
background-color: transparent;
338346
color: #fff;
339347
font-size: 0.8em;
@@ -494,6 +502,11 @@ footer {
494502
}
495503

496504
/* Responsive */
505+
@media only screen and (max-width: 1260px) {
506+
.products-container .products-box img {
507+
width: -webkit-fill-available;
508+
}
509+
}
497510
@media only screen and (max-width: 600px) {
498511
nav {
499512
width: 100%;
@@ -591,7 +604,8 @@ footer {
591604

592605
/* hero sec */
593606
.hero-sec img {
594-
height: 15em;
607+
/* height: 15em; */
608+
width: 100%;
595609
}
596610

597611
/* products title */
@@ -610,6 +624,9 @@ footer {
610624
height: auto;
611625
padding: 0
612626
}
627+
.products-container .products-box img{
628+
width: 11em;
629+
}
613630

614631
.products-box {
615632
width: 21vw !important;
@@ -637,10 +654,12 @@ footer {
637654
/* banner */
638655
.banner {
639656
padding: 0.6em 0 !important;
657+
flex-direction: column;
640658
}
641659

642660
.banner img {
643-
height: 20vh;
661+
width: 100%;
662+
height: 100%;
644663
}
645664

646665
/* mail sec */

0 commit comments

Comments
 (0)