nagasurendra commited on
Commit
dd7091f
·
verified ·
1 Parent(s): ca4a6e3

Update templates/cart.html

Browse files
Files changed (1) hide show
  1. 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
- @media (max-width: 768px) {
73
- .image-wrapper {
74
- width: 60px; /* Adjust the width for smaller screens */
75
- height: 100px !important; /* Adjust the height for smaller screens */
76
- }
77
- }
78
-
79
- .image-wrapper {
80
- width: 80px; /* Width of the image container */
81
- height: 140px !important; /* Height of the image container */
82
- display: flex; /* Flex container for image */
83
- align-items: flex-start; /* Align the image at the top */
84
- justify-content: center; /* Center image horizontally if it has space */
85
- }
 
 
 
 
86
  .cart-item img {
87
  width: 100%; /* Fill the image container */
88
  height: auto !important; /* Maintain aspect ratio */
89
- object-fit: contain; /* Ensure the full image is visible */
 
 
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 {