How to add margins/padding to sides of article post

Solved

How to add margins/padding to sides of article post

sohzasister
Visitor
2 0 1

Hi! I know little to nothing about code and I need help fixing my article page. I will post what code I am using for my article page and a link to our website and you'll get why I need to add margins/padding.

 

If you could let me know where and what I need to add to make this look better that would be very appreciated!

 

sections/article-template.liquid

Screenshot 2024-10-29 at 11.59.44 AM.pngScreenshot 2024-10-29 at 11.59.53 AM.png

 

Example Article  

 

 

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
8882 2123 2609

This is an accepted solution.

Hi @sohzasister 

If the shared link is your article page need to add. 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:

 

div#shopify-section-template--16797777395843__main {
    max-width: 90%;
    margin: auto;
    padding: 0 5rem;
}

 

  • And Save.
  • Result:
    Made4uoRibe_0-1730218452887.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 is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

View solution in original post

Replies 3 (3)

Made4uo-Ribe
Shopify Partner
8882 2123 2609

This is an accepted solution.

Hi @sohzasister 

If the shared link is your article page need to add. 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:

 

div#shopify-section-template--16797777395843__main {
    max-width: 90%;
    margin: auto;
    padding: 0 5rem;
}

 

  • And Save.
  • Result:
    Made4uoRibe_0-1730218452887.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 is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.
sohzasister
Visitor
2 0 1

Thank you ! Is there a way to add it to the top of the page as well?

 

Made4uo-Ribe
Shopify Partner
8882 2123 2609

Do you mean top of the image? 

Please, replace the code with this one. 

 

@media only screen and (min-width:750px){
div#shopify-section-template--16797777395843__main {
    max-width: 90%;
    margin: auto;
    padding: 2rem 5rem 0 5rem;
}
}
@media only screen and (max-width:749px){ 
   div#shopify-section-template--16797777395843__main {
    max-width: 95%;
    margin: auto;
    padding: 1rem 2rem 0 2rem;
} 
}

 

And Save. 

This also to fix the mobile not to much space on the side. 

Made4uoRibe_0-1730229526947.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 is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.