Created
September 2, 2022 16:55
-
-
Save iKunalmathur/1d526e5bba1f5ab8ce04688db9a2bf47 to your computer and use it in GitHub Desktop.
basic e-com homepage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Assignment 3 : final project --> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>E Commerce</title> | |
<!-- styling --> | |
<style> | |
body { | |
padding: 0; | |
margin: 0; | |
} | |
header { | |
position: fixed; | |
top: 0; | |
left: 0; | |
right: 0; | |
background-color: rgb(128, 141, 255); | |
color: #fff; | |
padding: 1rem; | |
} | |
nav { | |
display: flex; | |
gap: 1rem; | |
align-items: center; | |
justify-content: space-between; | |
} | |
.nav-link { | |
margin-inline: 1rem; | |
color: #fff; | |
text-decoration: none; | |
font-weight: 600; | |
} | |
main { | |
min-height: 100vh; | |
} | |
.container { | |
padding: 1rem; | |
background-color: #eee; | |
} | |
.card { | |
border: 1px solid #333; | |
padding: 1rem; | |
margin: 0.8rem; | |
display: inline-block; | |
max-width: 350px; | |
background-color: #fff; | |
border-radius: 1rem; | |
} | |
.card>img { | |
width: 100%; | |
height: 220px; | |
} | |
button { | |
padding: 0.5rem 0.8rem; | |
background-color: rgb(173, 150, 255); | |
color: #fff; | |
border: 0; | |
border-radius: 0.2rem; | |
} | |
.card-footer { | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
} | |
.price { | |
color: green; | |
font-size: 2rem; | |
font-weight: 600; | |
line-height: 0; | |
} | |
.spliter { | |
display: flex; | |
} | |
.sidebar { | |
width: 30%; | |
} | |
.products { | |
width: 70% | |
} | |
.filter-option { | |
display: flex; | |
} | |
</style> | |
</head> | |
<body style="padding-top:4rem"> | |
<header> | |
<nav> | |
<img src="https://via.placeholder.com/300x150" alt="logo" class="logo" width="100px"> | |
<div> | |
<a class="nav-link" href="#">Home</a> | |
<a class="nav-link" href="#">About</a> | |
<a class="nav-link" href="#">Contact</a> | |
</div> | |
</nav> | |
</header> | |
<main> | |
<div class="container"> | |
<div class="spliter"> | |
<aside class="sidebar"> | |
<p>Apply filters</p> | |
<form action="#"> | |
<div class="filter-option"> | |
<input type="radio" name="" id=""> | |
<label for="">Women</label> | |
</div> | |
<div class="filter-option"> | |
<input type="radio" name="" id=""> | |
<label for="">Men</label> | |
</div> | |
<div class="filter-option"> | |
<input type="radio" name="" id=""> | |
<label for="">Kids</label> | |
</div> | |
</form> | |
</aside> | |
<div class="products"> | |
<div class="card"> | |
<img src="https://via.placeholder.com/320x220" alt="image"> | |
<h3>Product title</h3> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Delectus libero, ab beatae cum dicta | |
aspernatur | |
asperiores mollitia consequuntur atque sint.</p> | |
<div class="card-footer"> | |
<button> | |
Add to cart | |
</button> | |
<p class="price">$89</p> | |
</div> | |
</div> | |
<div class="card"> | |
<img src="https://via.placeholder.com/320x220" alt="image"> | |
<h3>Product title</h3> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Delectus libero, ab beatae cum dicta | |
aspernatur | |
asperiores mollitia consequuntur atque sint.</p> | |
<div class="card-footer"> | |
<button> | |
Add to cart | |
</button> | |
<p class="price">$89</p> | |
</div> | |
</div> | |
<div class="card"> | |
<img src="https://via.placeholder.com/320x220" alt="image"> | |
<h3>Product title</h3> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Delectus libero, ab beatae cum dicta | |
aspernatur | |
asperiores mollitia consequuntur atque sint.</p> | |
<div class="card-footer"> | |
<button> | |
Add to cart | |
</button> | |
<p class="price">$89</p> | |
</div> | |
</div> | |
<div class="card"> | |
<img src="https://via.placeholder.com/320x220" alt="image"> | |
<h3>Product title</h3> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Delectus libero, ab beatae cum dicta | |
aspernatur | |
asperiores mollitia consequuntur atque sint.</p> | |
<div class="card-footer"> | |
<button> | |
Add to cart | |
</button> | |
<p class="price">$89</p> | |
</div> | |
</div> | |
<div class="card"> | |
<img src="https://via.placeholder.com/320x220" alt="image"> | |
<h3>Product title</h3> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Delectus libero, ab beatae cum dicta | |
aspernatur | |
asperiores mollitia consequuntur atque sint.</p> | |
<div class="card-footer"> | |
<button> | |
Add to cart | |
</button> | |
<p class="price">$89</p> | |
</div> | |
</div> | |
<div class="card"> | |
<img src="https://via.placeholder.com/320x220" alt="image"> | |
<h3>Product title</h3> | |
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Delectus libero, ab beatae cum dicta | |
aspernatur | |
asperiores mollitia consequuntur atque sint.</p> | |
<div class="card-footer"> | |
<button> | |
Add to cart | |
</button> | |
<p class="price">$89</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</main> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment