How to add borders to a theme in mobile version

Hi everyone,
I dont know why but my shopify store has no borders in the mobile version of the

Dropmeta®

How do I put borders around my whole store in both sides? I tried this one solution "https://community.shopify.com/c/shopify-discussions/how-to-put-borders-on-product-photos-in-dawn-theme/m-p/1830754"
But didn’t worked.

Here it is:

1 Like

Please share the link to your page.

Hello @Nilson_1

Thanks for the screenshot! It looks like you’re viewing your Shopify store on mobile and want to add borders (padding/margins) to the left and right sides of the whole layout, but currently the content stretches edge to edge.

This is a common issue, especially in themes like Dawn or others that are optimized for full-width mobile displays.

Solution: Add Side Padding to the Entire Page on Mobile
Here’s how to add left and right borders (via padding or margin) on mobile screens:

Step 1: Go to your Shopify theme code editor
. From your Shopify admin, go to Online Store > Themes

. Click Actions > Edit code

Step 2: Add Custom CSS
You can add this CSS either in your base.css or theme.css (depending on your theme), usually located in:

. Assets > base.css or

. Assets > theme.css.liquid

Scroll to the bottom of the file and add the following code:

@media screen and (max-width: 749px) {
  body {
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }
}

You can adjust 12px to your desired spacing (e.g., 16px or 20px for wider padding).

Want True Borders Instead of Padding?
If you want a visible line border, you can do this instead:

@media screen and (max-width: 749px) {
  body {
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }
}

Replace #ccc with your desired border color.

Final Tips:
. Clear your theme cache or use incognito mode after saving changes.

. If you’re using Dawn, the padding might need to go on .page-width instead of body. Let me know if you’re using a different theme.

Thank you :blush:

1 Like

Thank you so much.

1 Like

Thank you sir :blush: