How can I change the product background to match header and footer?

Topic summary

A user wants to change the product page background color to match their site’s header and footer. The initial issue is that product images have white backgrounds embedded in the JPG files themselves, which cannot be changed through CSS alone.

Proposed Solutions:

  • Add custom CSS code to the theme.liquid file (above the tag) to modify the background color
  • A revised CSS snippet was provided after the first attempt didn’t work properly

Key Technical Note:
Since the product images are JPG format with baked-in white backgrounds, changing the page background won’t affect the images themselves. The images would need to be replaced with transparent PNG files or re-edited to achieve a fully consistent background throughout.

Status: The discussion remains open as the user is testing the second CSS solution.

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

Hi,I Wan’t change product background same with header and footer,where to chang the code? https://dongfutrade.com/collections/used-canon-camera

Hey @dongfuCamera

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

Hi @dongfuCamera

Your product images are in .jpg and has white background so they cannot be change background colors

I Use this code,can’t see the next page line

Hey @dongfuCamera

Try this code with the same steps


If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

1 Like