Spaces:
Sleeping
Sleeping
Update templates/cart.html
Browse files- templates/cart.html +30 -23
templates/cart.html
CHANGED
@@ -46,43 +46,50 @@
|
|
46 |
border-radius: 8px; /* Optional: rounded corners */
|
47 |
transition: transform 0.3s;
|
48 |
}
|
49 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
.coupon-selection {
|
51 |
-
display:
|
52 |
-
|
53 |
-
grid-gap: 10px; /* Space between label and link */
|
54 |
align-items: center;
|
55 |
-
|
56 |
}
|
57 |
|
|
|
58 |
.coupon-selection label {
|
59 |
-
font-weight:
|
60 |
-
font-size: 1rem;
|
61 |
color: black;
|
62 |
}
|
63 |
|
|
|
64 |
.coupon-selection a {
|
|
|
65 |
font-size: 1rem;
|
66 |
-
color: #007bff;
|
67 |
text-decoration: none;
|
68 |
text-align: right;
|
69 |
}
|
70 |
|
71 |
-
#couponDropdown {
|
72 |
-
width: 30%; /* Set the dropdown width to 30% */
|
73 |
-
display: none; /* Hidden by default */
|
74 |
-
background-color: #fff;
|
75 |
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow for dropdown */
|
76 |
-
position: absolute; /* Position it absolutely */
|
77 |
-
top: 100%; /* Position it just below the coupon section */
|
78 |
-
right: 0; /* Align it to the right side */
|
79 |
-
z-index: 10; /* Make sure it stays above other content */
|
80 |
-
}
|
81 |
-
|
82 |
-
/* Show the dropdown when it's active */
|
83 |
-
#couponDropdown.show {
|
84 |
-
display: block;
|
85 |
-
}
|
86 |
|
87 |
|
88 |
.cart-item img:hover {
|
|
|
46 |
border-radius: 8px; /* Optional: rounded corners */
|
47 |
transition: transform 0.3s;
|
48 |
}
|
49 |
+
/* Make the parent container position relative */
|
50 |
+
.cart-summary {
|
51 |
+
position: relative; /* Makes sure the dropdown is positioned relative to this container */
|
52 |
+
}
|
53 |
+
|
54 |
+
/* Ensure the dropdown is within the card and 30% width */
|
55 |
+
#couponDropdown {
|
56 |
+
width: 30%; /* Dropdown takes 30% of the width */
|
57 |
+
position: absolute; /* Position it absolutely within the container */
|
58 |
+
top: 40px; /* Ensure it appears below the Apply Coupon link */
|
59 |
+
right: 0; /* Position it on the right side of the container */
|
60 |
+
display: none; /* Hidden by default */
|
61 |
+
background-color: #fff; /* White background for dropdown */
|
62 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow to dropdown */
|
63 |
+
z-index: 10; /* Ensure it stays above other content */
|
64 |
+
}
|
65 |
+
|
66 |
+
/* Show the dropdown when it's active */
|
67 |
+
#couponDropdown.show {
|
68 |
+
display: block;
|
69 |
+
}
|
70 |
+
|
71 |
+
/* Coupon Section Alignment */
|
72 |
.coupon-selection {
|
73 |
+
display: flex;
|
74 |
+
justify-content: space-between;
|
|
|
75 |
align-items: center;
|
76 |
+
font-size: 1rem;
|
77 |
}
|
78 |
|
79 |
+
/* Apply Coupon label style */
|
80 |
.coupon-selection label {
|
81 |
+
font-weight: bold;
|
|
|
82 |
color: black;
|
83 |
}
|
84 |
|
85 |
+
/* Apply Coupon link style */
|
86 |
.coupon-selection a {
|
87 |
+
color: #007bff; /* Blue color for the + Apply Coupon link */
|
88 |
font-size: 1rem;
|
|
|
89 |
text-decoration: none;
|
90 |
text-align: right;
|
91 |
}
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
|
95 |
.cart-item img:hover {
|