Shopify themes, liquid, logos, and UX
I Have a shoe store and have uploaded hundreds of images. unfortunately they are in a tall format, and I want to lose the top 33% of the image so it would align properly,
i don't want to change the container size I only want to shorten my images top down by 33%
is it possible to code in the template or them code to auto adjust images in the containers?
Solved! Go to the solution
This is an accepted solution.
Hi @MitchellTorres ,
Can you please try adding below css. Also remove the earlier one.
#shopify-section-template--21679519695150__main .grid__item.product__media-wrapper .media > *:not(.zoom):not(.deferred-media__poster-button) {
top: -20%;
}
Thank you
Hi @MitchellTorres ,
Can you please share a preview url so that I can assist you on?
Thank you
of course!
https://zatorres.com/products/balmoral-boot-in-tweed-and-brown-patina
you will see the boot image is border line anchored to the bottom of the container and it trims off a small amount of the sole. I would like to lose the top margin which would allow the image to "shift" up"
You can add below css in base.css file.
.grid__item.product__media-wrapper .media>*:not(.zoom):not(.deferred-media__poster-button) {
object-fit: contain;
}
Thank you
Thank you Luffy (great show!)
It fits now, but the image is now smaller than I would like it to be. If I set the them to the image "small", media fit "fill" and constrain to media to screen height - it accomplishes the same. I would like the image to be "Large" but still fit. I am able to accomplish that if I manually crop the image and choose 5:7 and move the editing box to the bottom of the image. this essentially crops off the top 20 - 33% of my uploaded image.
hope this makes sense.
This is an accepted solution.
Hi @MitchellTorres ,
Can you please try adding below css. Also remove the earlier one.
#shopify-section-template--21679519695150__main .grid__item.product__media-wrapper .media > *:not(.zoom):not(.deferred-media__poster-button) {
top: -20%;
}
Thank you
This did EXACTLY what I wanted. Thank you!!!!!!
Hi @MitchellTorres ,
Can you please like all the comments and mark it as accepted?
Thank you
I have another question - now that I have the image moved up - there is alot of space below to get to the thumbnails. Is there now a way to shorten the media container?
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025