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.