Re: Dawn Theme: Create margin site wide

Solved

How can I add a site-wide margin in the Dawn theme?

Ryanmue
Shopify Partner
31 0 7

Hey there, 

 

I’m building my website with the Dawn theme. I would like that on the whole website, that there is a margin on both sides. So that, for example, the picture banner doens‘t go completely to the edges. 

does anyone know how I can achieve this?

 

best

// Ryan

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
9884 2354 2951

This is an accepted solution.

Hi @Ryanmue 

Try this. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • Open the theme.liquid and paste the below code before the {% endstyle %}

 

body {
  margin: 20px;
}

 

  • Made4uoRibe_0-1697231092904.png
  • You can change the size of the margin you want. 
  • And Save. 
  • Result:
  • Made4uoRibe_1-1697231116298.png
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
9884 2354 2951

This is an accepted solution.

Hi @Ryanmue 

Try this. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • Open the theme.liquid and paste the below code before the {% endstyle %}

 

body {
  margin: 20px;
}

 

  • Made4uoRibe_0-1697231092904.png
  • You can change the size of the margin you want. 
  • And Save. 
  • Result:
  • Made4uoRibe_1-1697231116298.png
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.
Ryanmue
Shopify Partner
31 0 7

Thank you so much! It worked as expected. 

Made4uo-Ribe
Shopify Partner
9884 2354 2951

Welcome, please dont forget hit Like. 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.