Shopify themes, liquid, logos, and UX
Hello,
I previously used this code:
ProductGridContainer .card__media .media img { object-fit: contain !important;
for the product page. Now I need to update it for "related products" at the bottom of a single product page. Do you know what I need to change in this code? I right-clicked inspect to look for the proper name but none of them work. Could someone please help?
Solved! Go to the solution
This is an accepted solution.
Hello @Lexi123 ,
I understand you are looking to resolve the Alignment issue of the 'Product Related' section in the Product detail Page.
You can fix this issue by using the below CSS code.
Add the code at the bottom of the theme.liquid file before </body> tag and save.
<style>
.card__inner.color-background-1.gradient.ratio {
height: inherit !important;
}
</style>
[The code will fix alignment of product title/name, price and set size(height/width) for the uploaded product images]
Output -:
I hope the code helps you.
Please share if you have any queries.
Thank you.
This is an accepted solution.
Hello @Lexi123 ,
I understand you are looking to resolve the Alignment issue of the 'Product Related' section in the Product detail Page.
You can fix this issue by using the below CSS code.
Add the code at the bottom of the theme.liquid file before </body> tag and save.
<style>
.card__inner.color-background-1.gradient.ratio {
height: inherit !important;
}
</style>
[The code will fix alignment of product title/name, price and set size(height/width) for the uploaded product images]
Output -:
I hope the code helps you.
Please share if you have any queries.
Thank you.
Omg it worked!!! I was trying to fix this the wrong way.
Thank you so much! ❤️
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025