How can I center images vertically on my Craft theme?

Hello,

Hoping to find a solution here to wonky looking product tiles. The images are centered horizontally, but are all aligned to the top. As my products are all very different sizes, my photos are also not consistent. I would at least like to see if I can center them vertically as well so there is not so much white space between the bottom and the text. My theme is Craft. Hope this can be done! I have temporarily removed the password.

Here is a link:

https://d2aa1a.myshopify.com/

Thank you,

Simone

Hi Simone,

You can try to add this code to your theme.liquid file, before tag in Online store > Themes > Edit code to reduce that space


So your products will look like this

Thank you, but I want the text to stay at the bottom. I just want to center the pictures vertically so there is not so much white space between the text and the horizontal images that are all the top.

Hi @cobalthouse ,

:backhand_index_pointing_right: You can follow this way:

Step 1: Go to your css file

Step 2: Add the code at the bottom:

.card__inner.ratio {
    height: 250px;
}

( or 300px or 400px ) , You can fix it until you are satisfied

Good luck @cobalthouse !