Change Page Margins for Specific Page Template

Hi guys! I haven’t been able to find a thread that addresses this specifically, hoping someone on here can help :slightly_smiling_face:

I’m looking at a custom “page” template that I made for this specific page on the website: https://verygoodmfg.com/pages/copacking-production-capacity

For the rest of the website, I have everything set to full width (Page width 1600px in the theme settings in the theme editor). For this specific page template “capacity”, I’d like to add some margins and make the page width something like 1000 or 1200. (But still be responsive/not break anything!)

Let me know if there is custom code I can add that would affect only this page template “capacity.”

Thanks so much in advance!

Depending on theme see if you can add a custom liquid block/section.

If so just place a tag with your desired CSS in that setting for that page template.

Otherwise either modify the alternative template code itself to have the specific CSS .

Or create conditional logic in theme.liquid or css.liquid using the pages template SUFFIX to output specific css.

{%- if template.suffix == "capacity" -%}

{%- endif -%}

Or in theme.liquid output the template name as a class on the tag then make CSS in your themes main css that targets that selector.


If you need it customized for you contact me, info in signature.