Spaces:
Sleeping
Sleeping
Update templates/cart.html
Browse files- templates/cart.html +21 -15
templates/cart.html
CHANGED
|
@@ -69,24 +69,30 @@
|
|
| 69 |
text-align: right; /* Center-align the price */
|
| 70 |
white-space: nowrap; /* Prevent price text from wrapping */
|
| 71 |
}
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
.cart-item img {
|
| 87 |
width: 100%; /* Fill the image container */
|
| 88 |
height: auto !important; /* Maintain aspect ratio */
|
| 89 |
-
object-fit: contain;
|
|
|
|
|
|
|
| 90 |
|
| 91 |
}
|
| 92 |
.cart-item img:hover {
|
|
|
|
| 69 |
text-align: right; /* Center-align the price */
|
| 70 |
white-space: nowrap; /* Prevent price text from wrapping */
|
| 71 |
}
|
| 72 |
+
/* Default for larger screens like desktops */
|
| 73 |
+
.image-wrapper {
|
| 74 |
+
width: 80px; /* Width of the image container */
|
| 75 |
+
height: 140px !important; /* Height of the image container */
|
| 76 |
+
display: flex; /* Flex container for the image */
|
| 77 |
+
align-items: flex-start; /* Align the image at the top */
|
| 78 |
+
justify-content: center; /* Center image horizontally if it has space */
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
/* Responsive for mobile devices */
|
| 82 |
+
@media (max-width: 768px) {
|
| 83 |
+
.image-wrapper {
|
| 84 |
+
width: 60px; /* Adjust width for mobile */
|
| 85 |
+
height: auto !important; /* Let height adjust automatically based on content */
|
| 86 |
+
max-height: 100px; /* Set a max height to avoid image getting too large */
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
.cart-item img {
|
| 91 |
width: 100%; /* Fill the image container */
|
| 92 |
height: auto !important; /* Maintain aspect ratio */
|
| 93 |
+
object-fit: contain;
|
| 94 |
+
border-radius: 8px; /* Optional: rounded corners */
|
| 95 |
+
transition: transform 0.3s;/* Ensure the full image is visible */
|
| 96 |
|
| 97 |
}
|
| 98 |
.cart-item img:hover {
|