-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcart.html
More file actions
41 lines (33 loc) · 1.07 KB
/
cart.html
File metadata and controls
41 lines (33 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Cart</title>
<link rel="stylesheet" href="style.css">
<style>
body { font-family: Arial; padding: 20px; }
.cart-container { max-width: 900px; margin: auto; }
.cart-item {
display: flex; align-items: center;
border-bottom: 1px solid #ccc; padding: 10px 0;
}
.cart-item img { width: 100px; margin-right: 20px; border-radius: 8px; }
.item-info { flex: 1; }
.item-controls { text-align: right; }
button { padding: 6px 12px; }
.qty-btn { padding: 4px 10px; }
#total { font-weight: bold; font-size: 20px; margin-top: 20px; }
.empty { text-align: center; margin-top: 40px; font-size: 24px; }
</style>
</head>
<body>
<h1>Your Shopping Cart</h1>
<div class="cart-container" id="cart-items"></div>
<h2 id="total">Total: $0</h2>
<button onclick="clearCart()" style="background:red;color:white;margin-top:20px;">
Clear Cart
</button>
<script src="cart.js"></script>
</body>
</html>