How can I change the background color of just one product page without affecting the rest?

Solved

How can I change the background color of just one product page without affecting the rest?

George00011
Tourist
3 0 1

'm using the Dawn theme and I want to know how I can change the background color of this product page to white without affecting my other product pages

https://www.fitgstore.com/products/smartwatch-luna-fit-l1

George00011_0-1736714664845.png

 

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
10211 2427 3081

This is an accepted solution.

Hi @George00011 

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 "theme. Liquid" file. Find the </body> tag and paste the code below before the tag. 

 

<style>
{% if product.handle == 'smartwatch-luna-fit-l1' %}
 main#MainContent {
    background-color: red;
  }
{% endif %}
</style>

 

  • And Save.

 

 

 

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

 

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

View solution in original post

Replies 5 (5)

Made4uo-Ribe
Shopify Partner
10211 2427 3081

This is an accepted solution.

Hi @George00011 

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 "theme. Liquid" file. Find the </body> tag and paste the code below before the tag. 

 

<style>
{% if product.handle == 'smartwatch-luna-fit-l1' %}
 main#MainContent {
    background-color: red;
  }
{% endif %}
</style>

 

  • And Save.

 

 

 

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

 

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
George00011
Tourist
3 0 1

Thank You its worked, but i have problems with the font its white and i wanted white background. If i change the color of the font they change for all my other products =/ 

Made4uo-Ribe
Shopify Partner
10211 2427 3081

That is what im thinking also, you can add another code in that liquid code. LIke this. 

Same Instruction. 

 

<style>
{% if product.handle == 'smartwatch-luna-fit-l1' %}
 main#MainContent {
    background-color:white;
  }
.product__info-wrapper.grid__item * {
  color: black;
}
{% endif %}
</style>

 

And Save. 

But in this page you have another section that is not change into white backgrounds. 

this one. 

Made4uoRibe_0-1736772018287.png

 

 

 

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

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
George00011
Tourist
3 0 1

Would help me for change the of the font to black onyl for this page please ?

George00011_0-1736917266189.png

 

Made4uo-Ribe
Shopify Partner
10211 2427 3081

I give another code, it doesnt work? 

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.