Refresh Theme override style codes not working on base.css - Policy Width & Mobile View containers

Topic summary

A user is experiencing issues with CSS overrides in base.css not applying to policy page widths and mobile view containers in their Shopify Refresh theme (store: www.melaniejean.com).

Main Issues Identified:

  • Policy page width CSS not taking effect
  • Mobile content alignment shifting right and reverting after one day
  • Code persistence problems

Root Causes Found:

  • Missing closing tags throughout base.css file
  • Extra closing bracket (}) in the policy width code
  • Misplaced semicolon in the CSS syntax (max-width: 80%; !important; should be max-width: 80% !important;)
  • HTML <img> tag incorrectly placed within the CSS file

Solutions Provided:

  • Clean up closing tags and brackets in base.css
  • Fix CSS syntax errors (remove extra brackets, correct !important placement)
  • Remove HTML elements from CSS file
  • Alternative approach: Add conditional markup to theme.liquid file for policy pages

Status: The user confirmed the policy width issue was resolved after fixing the closing tags. The mobile centering issue appears to have been addressed through the theme.liquid modification suggested by LitExtension.

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

Hi,

I noticed the codes that I’m adding to base.css is not adjusting the site. For some changes I modified them directly under their areas such as uppercase for text. But for policy pages, thats nowhere that I can see, so I cannot widen the width under its specific location (policy-3e4aa3c07a3a61780d16bc4b828d2fef9e1a20a44aae36e029a7b98e5ee5a4d0.css)

I added this code to base.css:

/* Shopify Policy Width Control */
@media screen and (min-width: 750px) {
.shopify-policy__container {
max-width: 80%; !important;
}
}

but the policy widths look the same.

I’m also noticing that all the content for mobile view shifts to the right. I entered this code to base.css to center the contents, worked for one day and next day reverted back.

/* Center Mobile Contents */
@media screen and (max-width: 749px) {
.grid__item {
padding-left: 0;
}
}

I dont know what to do at this point.

my store is: www.melaniejean.com

1 Like

Hi @mjdubarr
Thank you for your question.
Please share your store URL, page URL and also password (if your store has one) so we can help you.

Hi there,

its www.melaniejean.com

there is no password

Hi @mjdubarr
Just checked your store, As I see file base.css missed a lot of close tag.
You need to check each of them and make sure the code add is correct.

Is the close tag a bracket like this?

}

@mjdubarr Yes, but not only one.

Would you mind telling me where?

Ok I figured out the code with the policies. Thanks for the tip! Unfortunately, this didn’t apply to centering the mobile contents.

/* Center Mobile Contents */
@media screen and (max-width: 749px) {
.grid__item {
padding-left: 0; !important;
}
}
}

What am I missing?

Hi @mjdubarr ,

Please go to theme.liquid file and add code here:

Code:

{%- if request.page_type == 'policy' -%}
    
    {%- endif -%}

Hope it helps!

Hi @mjdubarr ,

This is Victor from PageFly - Advanced Page Builder. I think the problem comes from this bracket on your code. Please try to remove it here:

Hope my solution works perfectly for you!

Best regards,

Victor | PageFly

That one is to close the code for the page width for policies, I did remove it to test it and it reverted the width. Then when I put it back, it didn’t change the width where I need it. So now I’m having the same issue with the code not staying. It worked yesterday.

@LitExtension OMG Thank you so much! I hope it sticks this time.

1 Like

Hi there,

The correct CSS would look as below:

@media (min-width: 750px) {
.shopify-policy__container {
max-width: 80% !important;
}
}

In your CSS, it has 3 ending brackets “}”. Consider removing one.

Also, your CSS file has a HTML img tag, which shouldn’t be there - consider removing it.

Removing the lines highlighted with red in the below screenshot should fix some of the issues.

Let me know if this addressed your issue.

Cheers!