We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Increasing Page Margins Without Affecting Other Pages

Solved

Increasing Page Margins Without Affecting Other Pages

Aaron-Mihell
Excursionist
43 0 11

Hi,

I would like to increase the margins of a specific page on mobile as I don't like how close the text is to the edge.

I would like to add left and right margins of 3rem but don't know how to go about doing that without affecting other pages or the header/footer on my website.

Page URL: https://solaque.co.uk/pages/care-guide

If anyone could help with achieving this, it would be greatly appreciated.

 

Thanks,
Aaron.

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
10211 2427 3079

This is an accepted solution.

Hi @Aaron-Mihell 

TYRy 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. 

 

{% if page.handle == 'care-guide' %}
<style>
    @media only screen and (max-width: 749px) {
        .section-template--23721731457355__main-padding {
            margin: 0 3rem;
        }
    }
</style>
{% endif %}

 

  • And Save. 
  • Result:
    Made4uoRibe_0-1736349859349.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 3 (3)

Made4uo-Ribe
Shopify Partner
10211 2427 3079

This is an accepted solution.

Hi @Aaron-Mihell 

TYRy 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. 

 

{% if page.handle == 'care-guide' %}
<style>
    @media only screen and (max-width: 749px) {
        .section-template--23721731457355__main-padding {
            margin: 0 3rem;
        }
    }
</style>
{% endif %}

 

  • And Save. 
  • Result:
    Made4uoRibe_0-1736349859349.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.
Aaron-Mihell
Excursionist
43 0 11

Thank you. That worked perfectly.

Made4uo-Ribe
Shopify Partner
10211 2427 3079

Welcome! Would you mind hitting 'like' as well? 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.