Topic: Inconsistent page width and margins in Shopify’s Dawn theme across pages and on mobile.
Initial issue: A global CSS override (.page-width { max-width: 100% !important; }) fixed some pages but broke others and created oversized mobile margins.
Mobile fix: A helper suggested adding custom CSS in theme.liquid (head) to reduce mobile spacing; the store owner confirmed it improved mobile layout. They also reintroduced the .page-width rule but still saw misalignment between pages.
Desktop alignment: A follow-up suggestion proposed adding desktop-only padding to .content-for-layout to align content. The store owner suspects differing box/section settings and will continue adjusting via custom CSS in the editor.
Root cause explanation: Another contributor noted Dawn uses multiple wrappers per template/section (.page-width, .content-container, .section, etc.). A single global rule can cause inconsistent results. Recommended targeting specific templates (e.g., .template-collection .page-width, .template-product .page-width) or specific section IDs for precise control.
Status: Mobile spacing improved; cross-page alignment still being refined. No final resolution yet.
Summarized with AI on December 11.
AI used: gpt-5.
I am a beginner in using shopify and building websites and currently struggle getting the widht right.
I tried putting the code in the end of the base.css section first, however it ended up working well only for some pages while other still were messed up. Also when doing this, the margin in mobile-view were to big.
.page-width {
max-width: 100% !important;
}
It seems like something is off somewhere and I might have messed it up myself tbh.
No I have undone the css code, because it messed everything up. So now it is basically as it was before. But if you check the other pages, you will see that there the margins are too big on mobile view.
Thanks, I think the confusion came with the box itself having a different configuration. I will check again and see if I can get it fixed with playing around with custom css in the editor. Thanks!
If that .page-width override is only working on some pages, it’s usually because Dawn (and most modern Shopify themes) use multiple wrappers depending on the template. Some pages use .page-width, others use .content-container, .section, or even inline container styles inside specific sections.
Because of that, a global max-width: 100% !important; often creates exactly what you’re seeing — random pages breaking, mobile spacing getting weird, etc.
A safer approach is to target only the specific templates or sections that feel too narrow, for example:
.template-collection .page-width,
.template-product .page-width {
max-width: 1200px; /* or whatever size feels right */
margin: 0 auto;
}
(You can inspect the page, grab the section ID, and keep the change isolated so nothing else breaks.)
If you’d rather skip hunting down wrapper classes, my app EasyEdits lets you visually widen or shrink specific pages/sections without touching any CSS. You can make the tweak once and preview it safely without affecting the rest of your theme.
Full disclosure: I’m the developer of EasyEdits — happy to answer questions or even point you to the exact section ID if you want.