Skip to content

Instantly share code, notes, and snippets.

@Signor1
Created September 17, 2025 18:10
Show Gist options
  • Select an option

  • Save Signor1/b7dd016180b0a93adda764707be1e24f to your computer and use it in GitHub Desktop.

Select an option

Save Signor1/b7dd016180b0a93adda764707be1e24f to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Jumia</title>
<link rel="stylesheet" href="css/styles.css">
<link href="https://cdn.jsdelivr.net/npm/remixicon@4.5.0/fonts/remixicon.css" rel="stylesheet" />
</head>
<body>
<main>
<section class="top-sellers">
<div class="top-sellers-header">
<h3>Top Sellers</h3>
<a href="#" class="see-all">
See All
<i class="ri-arrow-right-s-line"></i>
</a>
</div>
<div class="top-sellers-products">
<!-- Signle product -->
<div class="product" data-discount="-7%">
<div class="wrapper">
<img src="img/1.jpg" alt="product image">
</div>
<h4>Haier Thermocool 200</h4>
<h5>&#8358; 368,900</h5>
<p>&#8358; 400,000</p>
</div>
<!-- Signle product -->
<div class="product" data-discount="-7%">
<div class="wrapper">
<img src="img/2.jpg" alt="product image">
</div>
<h4>Haier Thermocool 200</h4>
<h5>&#8358; 368,900</h5>
<p>&#8358; 400,000</p>
</div>
<!-- Signle product -->
<div class="product" data-discount="-7%">
<div class="wrapper">
<img src="img/3.jpg" alt="product image">
</div>
<h4>Haier Thermocool 200</h4>
<h5>&#8358; 368,900</h5>
<p>&#8358; 400,000</p>
</div>
<!-- Signle product -->
<div class="product" data-discount="-7%">
<div class="wrapper">
<img src="img/4.jpg" alt="product image">
</div>
<h4>Haier Thermocool 200</h4>
<h5>&#8358; 368,900</h5>
<p>&#8358; 400,000</p>
</div>
<!-- Signle product -->
<div class="product" data-discount="-7%">
<div class="wrapper">
<img src="img/5.jpg" alt="product image">
</div>
<h4>Haier Thermocool 200</h4>
<h5>&#8358; 368,900</h5>
<p>&#8358; 400,000</p>
</div>
<!-- Signle product -->
<div class="product product-without-discount">
<div class="wrapper">
<img src="img/6.jpg" alt="product image">
</div>
<h4>Haier Thermocool 200</h4>
<h5>&#8358; 368,900</h5>
<!-- <p>&#8358; 400,000</p> -->
</div>
</div>
</section>
</main>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100%;
height: 100vh;
}
main {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #bbb;
}
main section {
width: 70%;
height: auto;
background-color: white;
overflow: hidden;
border-radius: 8px;
display: flex;
flex-direction: column;
gap: 1rem;
}
.top-sellers .top-sellers-header {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
background-color: orange;
padding: 18px 20px;
}
.top-sellers-header>h3 {
font-family: sans-serif;
font-size: 20px;
font-weight: 400;
}
.top-sellers-header>a {
text-decoration: none;
color: black;
font-family: sans-serif;
font-size: 15px;
font-weight: 400;
}
.top-sellers-products {
width: 100%;
padding: 0px 10px 10px 10px;
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 8px;
}
.top-sellers-products>.product {
width: 100%;
height: auto;
padding: 10px;
border-radius: 8px;
transition: all .3s ease;
position: relative;
}
.top-sellers-products>.product:not(.product-without-discount):after {
content: attr(data-discount);
position: absolute;
display: inline-block;
right: 10px;
top: 10px;
color: orange;
background-color: wheat;
padding: 10px 8px;
border-radius: 2px;
}
.top-sellers-products>.product:hover {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
cursor: pointer;
}
.product .wrapper {
width: 100%;
height: 200px;
overflow: hidden;
}
.product .wrapper img {
width: 100%;
height: 100%;
object-fit: contain;
transition: all .3s ease;
}
.top-sellers-products>.product:hover .wrapper img {
transform: scale(1.1);
}
.product>h4 {
font-family: sans-serif;
font-size: 15px;
font-weight: 300;
margin-block: 10px 8px;
}
.product>h5 {
font-family: sans-serif;
font-size: 17px;
font-weight: 500;
margin-bottom: 3px;
}
.product>p {
font-family: sans-serif;
text-decoration: line-through;
font-weight: normal;
font-size: 14px;
color: gray;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment