How to change the width of pages and blog posts California ?

Topic summary

A user sought help narrowing the full-width layout of pages and blog posts in Shopify’s California theme, finding the wide format difficult to read.

Solutions Provided:

Two working CSS solutions were offered, both involving adding custom code before the </head> tag in theme.liquid:

  • GemPages suggested a <style> block targeting .main-content with max-width and margin: auto
  • PageFly-Victor provided conditional CSS using {% if template== 'pages' or template=='blogs'%} to limit width specifically on those templates

Both solutions included screenshots showing code placement.

Outcome:

The original poster confirmed both approaches worked successfully after adjusting the width values to their preference.

Follow-up:

Another user (MXJEWELRY) reported the same issue but stated the provided code didn’t work for their site, requesting additional assistance.

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

Hello,

I would like to change the width of the all pages and blog posts/articles on the California theme. To read an article or a info page is really hard with this flu width.

I tried a few codes I have found in the community, sadly all not successful. Maybe you know a solution.

Example blog article: https://luc8k.com/blogs/general-news/reimagining-luxury

All pages: https://luc8k.com/pages/leather-craftsmanship

Thanks so much for your help.

Hello @Luc8k ,

I would like to give you some recommendations to support you:

  1. Go to Online Store → Theme → Edit code
  2. Open your theme.liquid theme file
  3. Paste the below code before

For example,

If you require any further information, feel free to contact me.
Best regards,
GemPages Support Team

1 Like

Hi @Luc8k ,

This is Victor from PageFly - Shopify Page Builder App.

Please try this way: At code after of theme.liquid

{% if template== 'pages'  or template=='blogs'%}

      

  {% endif %}

Hope my solution works perfectly for you!

Regards,
Victor | PageFly

1 Like

Thanks soooo much it worked perfectly. I adjusted the size a bit. Now it shows as we like. :grinning_face_with_smiling_eyes:

Thank you very much.

Cheers

1 Like

Thanks so much. It works with your code as well. :grinning_face_with_smiling_eyes:

Cheers

2 Likes

Hello @Luc8k ,

I am so glad that my solution can help.

Best regards,
GemPages Support Team

Hi I’m facing the same issue, hope you can have a look at my website, I’ve tried the code but didn’t work for me, thank you in advance

https://mexajewelry.com/pages/acerca-de-nosotros