Taming Your Shopify Theme's Width: A Dwell Theme Deep Dive (and universal fix!)

Hey there, fellow store owners! Ever found your Shopify store's content area feeling a bit too expansive, especially on larger screens? Like many of us, you might want to rein things in, creating a more focused, snug experience for your customers. That's exactly what sparked a great discussion in the Shopify Community forums recently.

A store owner, BelgerArts, was using the Dwell theme and felt the default page width was "too wide," looking for a way to make every page narrower. It's a common desire – a more contained layout can often improve readability and visual hierarchy, especially on big monitors.

Understanding Your Theme's Canvas: The Page Width Container

When you want to make your page "narrower," you're essentially looking to reduce the max-width of your theme's main content container. Most Shopify themes, including Dwell, use a wrapper class (often .page-width, .main-content, or .container) that dictates how far your content stretches. By adjusting its max-width and adding margin: 0 auto;, you can center your content and give it that desired contained feel.

Community Insights: Solutions & Clarifications

Our community quickly offered some great insights! devcoders provided a CSS snippet targeting the .page-width class. While their code was designed to increase the max-width to 1200px (which is useful if you want more space!), it correctly identified the key properties and the common class name:

@media screen and (min-width: 750px) {
  .page-width {
    max-width: 1200px !important;
    margin: 0 auto !important;
  }
}

However, BelgerArts wanted narrower pages. This is where youssefhe5 provided the perfect, direct solution, confirming .page-width is indeed the class to target for Dwell and most other themes, and offering a snippet to reduce its width:

.page-width {
max-width: 1000px; /* Adjust this value to your desired maximum width */
margin: 0 auto; /* This keeps it centered */
}

This snippet is ideal for reducing the max-width (you can choose any value, e.g., 1000px) and uses margin: 0 auto; to keep your content perfectly centered. Let's look at how you can implement this in your store.

Step-by-Step: Adjusting Your Theme's Page Width

Ready to make these changes? We'll cover the most robust method first, then a user-friendly alternative.

Method 1: Editing Your Theme's Core CSS File (Recommended)

This approach ensures your CSS applies consistently across your store.

  1. Navigate to Your Theme Code: From your Shopify admin, go to Online Store > Themes. Find your current theme, click Actions, then select Edit code.
  2. Locate Your Stylesheet: In the Assets folder, look for files like base.css or theme.css. These are common places for general styling.
  3. Add the CSS Snippet: Scroll to the very bottom of that file and paste the following code. Remember to adjust the max-width value (e.g., 1000px, 960px, 1100px) to your desired narrower width.
    .page-width {
    max-width: 1000px; /* Adjust this value to your desired maximum width */
    margin: 0 auto; /* This keeps it centered */
    }
    
  4. Save and Preview: Click Save. Preview your store, clearing your browser cache if needed.

Method 2: Using the Theme Editor's "Custom CSS" Section (If available)

Many modern themes offer a "Custom CSS" box, a user-friendly option if you have it.

  1. Go to Theme Customizer: From your Shopify admin, go to Online Store > Themes. Find your theme, click Customize.
  2. Find Custom CSS: Look for Theme settings (often a gear icon) > Custom CSS.
  3. Paste and Save: Paste the same CSS snippet into this box, adjusting the max-width.
    .page-width {
    max-width: 1000px; /* Adjust this value to your desired maximum width */
    margin: 0 auto; /* This keeps it centered */
    }
    
  4. Save Changes: Click Save in the theme editor.

Troubleshooting Tip: When .page-width Isn't the Right Selector

Youssefhe5 wisely noted that not every theme uses .page-width. If your changes don't appear, use your browser's inspector tool:

  1. Right-Click and Inspect: On any store page, right-click the main content and select Inspect.
  2. Identify the Main Container: Look for the
    element wrapping your page content. It will have a class or ID (e.g.,
    ).
  3. Replace the Selector: Replace .page-width in your CSS snippet with that exact selector (e.g., .main-content-wrapper or #content).

A Quick Note on !important

devcoders' snippet used !important. This declaration forces a style, overriding conflicts. While useful as a last resort, it can complicate maintenance. Try the snippet without !important first. If changes don't take effect, then adding it (e.g., max-width: 1000px !important;) can work, but always prefer more specific selectors if possible.

And there you have it! With a few lines of CSS, you can tailor your Shopify store's layout to feel just right. These small customizations truly enhance the browsing experience. A big thanks to BelgerArts for sparking this conversation and to devcoders and youssefhe5 for their valuable contributions!

Remember, always back up your theme before making code changes. Happy customizing!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases