Background image to a section

Topic summary

A user seeks help adding a background image to Shopify’s product grid section on their collection page, wanting to replace the default background with a specific starry sky image.

Solutions Provided:

  • Primary approach: Add CSS code to the theme’s stylesheet (base.css, style.css, or theme.css) targeting the product grid section with background-image, background-repeat: no-repeat, background-size: cover, and background-color: transparent properties.

  • Specific targeting: Use CSS selectors like #ProductGridContainer or the section’s unique ID to apply the background image.

Follow-up Issue:

The original poster asks how to make the white background around individual product cards transparent. A solution is offered using CSS to target .card.card--standard.card--text with modified background and color properties using !important flags.

The discussion remains open pending confirmation that the transparency solution works as intended.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

does anyone know how to add a background image to a section generated by shopify which is the product grid section. this is my website link: https://euwumd-v0.myshopify.com/collections/all and this is the image I want it changed to: https://cdn.shopify.com/s/files/1/0734/1175/6250/files/milky-way-starry-sky-night-sky-star-956981.jpg?v=1733346155

1 Like

Hi @SixTwoSix

Do you mean like this?

If it is try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. 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:
.section-template--18783816155354__product-grid-padding {
    background-image: url(https://cdn.shopify.com/s/files/1/0734/1175/6250/files/milky-way-starry-sky-night-sky-star-956981.jpg?v=1733346155);
    background-repeat: no-repeat;
    background-size: cover;
    background-color: transparent;
}
  • And Save.

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!

Yes this is perfect but how do I make the white around the product transparent

Hi @SixTwoSix

here is the solution please add this css on theme.css file

#ProductGridContainer {
    background-image: url(https://cdn.shopify.com/s/files/1/0734/1175/6250/files/milky-way-starry-sky-night-sky-star-956981.jpg?v=1733346155);
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
    max-width: 100%;
}

I hope it will work.

Thanks And Regards

Hi @SixTwoSix

For white around the product transparent

.card.card--standard.card--text {
    background: #fff !important;
    color: #000 !important;
}

If the solution is working please accept solution as mark as acceptable.

Thanks