We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Product images don't align in product collections

Solved

Product images don't align in product collections

ChrisM187
Excursionist
29 0 15

Hello, I have different products on my website (trinitysneakers.com) and when for example, sneakers and Clothing, are in the same collection, the images and titles do not align and it does not look clean. I was told it is fixable through code, but i do not know how to code and therefore ask you guys for help. I tried changing the ratio to square or portrait, but then half of the images are cut off. I just want the products to show in equal size, without distorting the image.
Here is an example of how it looks right now:

ChrisM187_0-1726998261336.png

Maybe having all images as squares, without zooming in or anything would fix that, as seen on sneak.eu website how it would look.
Thank you in advance!

Accepted Solutions (2)
BSSCommerce-B2B
Shopify Partner
1972 564 567

This is an accepted solution.

Ok change the previous code like this

.card-wrapper .card__inner {
  height: 140px!important 
}

It will apply for all product card on your site.

If it helps you, please like and mark it as the solution!

Best Regards 😊

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

BSSCommerce-B2B
Shopify Partner
1972 564 567

This is an accepted solution.

Add more this code to the end of base.css file

.card .card__inner .card__media img {
    object-fit: contain!important;
}

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

Replies 12 (12)

BSSCommerce-B2B
Shopify Partner
1972 564 567

@ChrisM187 ,

Step 1. Go to Admin -> Online store -> Theme > Edit code

Step 2. Find the file theme.liquid.

Step 3. Add this code above </body>

<style>
 .card__content .card__information { 
     display: flex; 
     flex-direction: column; 
     justify-content: end; 
 }
</style>

Result: 

BSSCommerceB2B_0-1726999023217.png

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

ChrisM187
Excursionist
29 0 15

Unfortunately that did not work, but it is also not the result i'm looking for, if you check out the store i mentioned, sneak.eu , you will see that the products look like this: 

ChrisM187_0-1726999340973.png

 

BSSCommerce-B2B
Shopify Partner
1972 564 567

If you want to do that, you should use all the images at the same size, or you have to set a fixed size for all the images.

BSSCommerceB2B_0-1726999576664.png

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

ChrisM187
Excursionist
29 0 15

Alright and is it possible to Bulk change the size for all products? or how would i do that then? But as said, the owner of sneak.eu told me it was done by code

BSSCommerce-B2B
Shopify Partner
1972 564 567

1. It's the post you could follow to Bulk change the size for all products: https://community.shopify.com/c/shopify-design/is-there-any-way-i-can-resize-all-my-product-images-a...

2. If you want to do it my way and set a fixed size for the images, you can add this code to the end of the base.css file

 

#collection-template--23534871675226__featured_collection .card__inner {
  height: 140px!important 
}

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

ChrisM187
Excursionist
29 0 15

Thank you, the code worked, but inside the collection it is back to normal sizing, while on the main page it is changed.. is there a way to make it change everywhere? And generally do it for all collections, not just. the featured collection, in order for all products and collections to have the same hight and not look different..

ChrisM187_0-1727000795771.png

ChrisM187_1-1727000806250.png

 

BSSCommerce-B2B
Shopify Partner
1972 564 567

This is an accepted solution.

Ok change the previous code like this

.card-wrapper .card__inner {
  height: 140px!important 
}

It will apply for all product card on your site.

If it helps you, please like and mark it as the solution!

Best Regards 😊

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

ChrisM187
Excursionist
29 0 15

Looks great, thank you very much!

ChrisM187
Excursionist
29 0 15

Actually, now when i am in the product page itself, the "you may also like" at the bottom of the product page looks like this, cut off..
can we fix this too??

ChrisM187_0-1727001921066.png

 

BSSCommerce-B2B
Shopify Partner
1972 564 567

@ChrisM187, add this code to  the end  of  base.css file

product-recommendations .card-wrapper .card__inner {
  height: unset!important 
}

Result:

BSSCommerceB2B_0-1727003288929.png

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

ChrisM187
Excursionist
29 0 15

Great, but now the width on the collections and products is too narrow, and the products are slightly cut off on each side.. i would like to have a little space between the products and the product image border, if you get what im saying..

ChrisM187_0-1727006322443.png

 

BSSCommerce-B2B
Shopify Partner
1972 564 567

This is an accepted solution.

Add more this code to the end of base.css file

.card .card__inner .card__media img {
    object-fit: contain!important;
}

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now