Center images around tallest one in product gallery
-
This seems like something fairly straightforward, yet I can’t come across a solution.
My store has images of different sizes / aspect ratios. While I realize this may not be ideal, I’m OK with that and would rather not resize them. I also do not want any solution that involves cropping them.
Here’s what this looks like now:Note how the “add to cart” buttons, descriptions, price are not aligned due to the different image heights.
What I’d like, is to center the images to the tallest one in the row, adding padding on top and bottom as necessary. Example here:Another option is to just set a fixed/max height, and have the browser crop the bottom on anything that goes over.
I’m 99% this is possible purely with CSS, with no cropping, image processing plug-ins etc.
Would really appreciate if someone could point me a solution.
Bonus if you can also help with the aligning the “add to cart” button when the product title has a varying number of lines.Thanks in advance!!!
- The topic ‘Center images around tallest one in product gallery’ is closed to new replies.