Having trouble vertically aligning an image within a DIV

I’m having real difficulty vertically aligning the images (both primary and secondary on hover) within their DIV (collection_product_image_frame) on the following page: https://willos.co.uk/collections/toys-games-new-in. I have tried all of the usual CSS without much success so I must be missing something. Can anyone help?

Hi @willogroup ,

You’re trying to center it like this:

Go to Assets > theme.css and paste this at the bottom of the file:

.collection_product_image_aspect-ratio img{
	bottom: 0 !important;
    top: 0 !important;
}

Hope it helps!

1 Like

@LitExtension I forgot to add the bottom: 0; to the class, how silly of me! Thank you kindly sir, your fresh pair of eyes are much appreciated.

1 Like