Change background color of a specific page

Hi! I use a Dawn Shopify theme and I want to change the background color of only one specific product page. I tried to use CSS, but if I write ".product { background-color: red; }, the background-color will change on every product.

Can anyone help?

Best regards

Hi @Artur9 ,

Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above tag:

{% assign full_url = request.host | append: request.path %}
{% if full_url contains 'your-url-page' %}

{% endif %}

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you :heart_eyes:

1 Like

Hi @Artur9 ,

You can follow these steps to make the effect

  1. Open Online Store > Theme > Edit Code

  2. Find and open the theme.liquid file

  3. Paste the code snippet below before the closing head tag and hit save


Hope this helps you solve the issue.

Please don’t forget to Like and Mark it as an Accepted Solution if you find this helpful. Thank you!

Hi! Thank you for your answer, but unfortunately it doesn’t work.

1 Like

Hi @Artur9 , Can you kindly share the details of your problem (screenshot/ link page) with us? We will check it and suggest you a solution if possible.

1 Like


I want to make another background color only on this page.

I hope you can solve the problem!

BG

Thank you for answering! Unfortunately it doesn’t work too.

BG