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

Topic summary

Adding global left/right margins in Shopify’s Dawn theme to prevent sections (e.g., image banner) from touching the edges.

Proposed fix: edit the theme code and add a site-wide CSS margin.

  • Admin > Online Store > Themes > Actions > Edit code
  • Open theme.liquid and insert: body { margin: 20px; } before {% endstyle %}
  • Save and adjust the 20px value as needed.

Notes:

  • CSS (Cascading Style Sheets) controls styling; the body rule applies margins to the entire page.
  • theme.liquid is a core layout file in Shopify themes.
  • The code snippet is central to the solution; images in the thread show where to edit and the visual result.

Outcome: The change worked as expected for the requester. No disagreements or further issues; the thread is resolved.

Summarized with AI on January 16. AI used: gpt-5.

Thank you so much! It worked as expected.

1 Like