Policy Page, background and text colour change

Solved

Policy Page, background and text colour change

shopcheri
Excursionist
23 0 4

How do I change the background color and text colour of all policy page and contact us pages.

 

i want background colour: #FAF8F1

text colour: #D94F16

 

Screenshot 2024-12-17 at 10.17.36 PM.png

 

URL:  shopcheri.co

 

password free

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
10200 2421 3065

This is an accepted solution.

Hi @shopcheri 

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:

 

main#MainContent:has(.shopify-policy__container) {
    background: #FAF8F1;
    max-width: 100%;
    margin-bottom: -20px;
}

.shopify-policy__body {
    max-width: 560px;
    margin: auto;
}
.shopify-policy__title h1 {
    margin-top: 0;
    padding-top: .67em;
}

.shopify-policy__container * {
    color:  #D94F16;
}

.shopify-policy__body .rte p {
    margin-bottom: 0;
}

 

  • And Save.
  • Result:
  • Made4uoRibe_0-1734457955726.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.

View solution in original post

Replies 12 (12)

zack_dev
Shopify Partner
92 15 15

hi

first step is to add html class to pages for this 

you can add the following on theme.liquid.
Go to online store > next to themes click on three dots then edit code > under layout > theme.liquid 

 

then insert {{ page.handle }} to <body tag so it looks like

<body class="{{ page.handle }} gradient">  .

Then we can add specific css to page.



- Helpful? Like or Accept solution, - Buy me Coffee


-

Contact me

TheScriptFlow
Shopify Partner
709 49 95

Hi @shopcheri this is Qasim ready to help you. 

- Need a Shopify Specialist? Chat on WhatsApp Or Email at info@thescriptflow.com

- Boost Your Sales with Affiliate Marketing - UpPromote: Affiliate & Referral


- If my solution was helpful, mark it as a solution and hit the like button! And Wait Don't forget to Buy me a Coffee

Guleria
Shopify Partner
4146 809 1164

Hello @shopcheri ,

 

Edit theme.liquid
search for </body>

here just before to it add this code 

 

{% if request.path == '/policies/privacy-policy'  
   or request.path == '/policies/shipping-policy' 
   or request.path == '/policies/contact-information' %}
   <!-- Content or logic for the specified pages -->
   <style>
 #MainContent {
    background-color: #000;
}
#MainContent * {
    color: #fff;
}
</style>
{% endif %}

 

 

 

 

Regards
Guleria

- Custom themes, UI/UX design, ongoing maintenance & support.
- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com Skype: live:navrocks1
- Try GEMPAGES a great page builder
shopcheri
Excursionist
23 0 4

facing same issue with your code adjustment:

the last line from ALL policy sections as well contact us page is being cut off.

please suggest how tot fix this issue.

Screenshot 2024-12-20 at 2.28.22 PM.png

Made4uo-Ribe
Shopify Partner
10200 2421 3065

This is an accepted solution.

Hi @shopcheri 

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:

 

main#MainContent:has(.shopify-policy__container) {
    background: #FAF8F1;
    max-width: 100%;
    margin-bottom: -20px;
}

.shopify-policy__body {
    max-width: 560px;
    margin: auto;
}
.shopify-policy__title h1 {
    margin-top: 0;
    padding-top: .67em;
}

.shopify-policy__container * {
    color:  #D94F16;
}

.shopify-policy__body .rte p {
    margin-bottom: 0;
}

 

  • And Save.
  • Result:
  • Made4uoRibe_0-1734457955726.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.
shopcheri
Excursionist
23 0 4

thanks so much! that worked!

shopcheri
Excursionist
23 0 4

i just check the mobile version.

 

so the last from the refund policy, and contact us page is being cut for some reason.

 

is there a solution for that?

IMG_8517.jpg

shopcheri
Excursionist
23 0 4

last line*

Made4uo-Ribe
Shopify Partner
10200 2421 3065

Oh, It's from the footer padding.. As you can see on the code I provide I didnt add anything on the footer. 

Try to find the file "refund.policy" you can search it 

Made4uoRibe_0-1734526551443.png

And find this line. 

Made4uoRibe_1-1734526591264.png

You can add some comment sign. 

Made4uoRibe_2-1734526615951.png

or remove it. 

When I remove this is the result. 

Made4uoRibe_3-1734526656602.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.
shopcheri
Excursionist
23 0 4

i cant seem to find "refund policy" anywhere

shopcheri
Excursionist
23 0 4

is there any other way ?

Made4uo-Ribe
Shopify Partner
10200 2421 3065

Did you already solved the issue?

THis is on my end.

Made4uoRibe_0-1734701535262.png

 

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.