Solved

Transparent Background For Product Images On Collection Pages - Dawn- Mega Menu Extender

shadow3
Visitor
1 0 1

I'm sure this is a simple line of code but I can't figure it out on my own or find the answer already.

 

My product images have transparent backgrounds but when included on a collections page, the background turns grey or an off-white again. How do I make the background on these images transparent all around?

 

thephoenixec.com

ahglow

 

Screenshot 2024-03-18 at 11.17.15 AM.pngScreenshot 2024-03-18 at 11.17.24 AM.pngScreenshot 2024-03-18 at 11.17.33 AM.png

Accepted Solution (1)

diego_ezfy
Shopify Partner
2958 568 890

This is an accepted solution.

@shadow3@shadow3, do this to fix it in 20 seconds:

1. In your Shopify Admin go to: online store > themes > actions > edit code
2. Find Asset > base.css and paste this at the bottom of the file:

[id] .collection .card__inner {
    background: transparent !important;
}


This will ensure the code is applied exclusively to collection items and not elsewhere.

If it helps you please click on the "like" button and mark this answer as a solution!

Thank you.

Kind regards,
Diego

◦ Follow my blog & youtube for coding tutorials.
◦ Replace apps with copy/paste code snippets and save money.

View solution in original post

Replies 2 (2)

Made4uo-Ribe
Shopify Partner
5414 1303 1601

Hi @shadow3 

Check this one. 

From your Shopify admin dashboard, click on "Online Store" and then "Themes".

Find the theme that you want to edit and click on "Actions" and then "Edit code".

In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

.card__inner.color-background-2.gradient.ratio {
    background: transparent !important;
}

 

And Save. 

Result:

Made4uoRibe_0-1710779038669.png

 

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


diego_ezfy
Shopify Partner
2958 568 890

This is an accepted solution.

@shadow3@shadow3, do this to fix it in 20 seconds:

1. In your Shopify Admin go to: online store > themes > actions > edit code
2. Find Asset > base.css and paste this at the bottom of the file:

[id] .collection .card__inner {
    background: transparent !important;
}


This will ensure the code is applied exclusively to collection items and not elsewhere.

If it helps you please click on the "like" button and mark this answer as a solution!

Thank you.

Kind regards,
Diego

◦ Follow my blog & youtube for coding tutorials.
◦ Replace apps with copy/paste code snippets and save money.