Reducing product page width on desktop view

Topic summary

A user seeks to reduce product page width and add left/right padding exclusively on desktop view, without affecting other pages.

Initial Solutions Provided:

  • Multiple CSS code snippets were offered targeting .page-width with media queries for desktop screens
  • Early solutions inadvertently affected all pages rather than just the product page

Refined Requirements:

  • User clarified they want padding applied only to the product form area, not site-wide
  • Provided screenshots highlighting the specific section needing adjustment

Final Solutions:
Three CSS approaches were presented:

  1. Targeting div#shopify-section-template with 10% padding
  2. Two visual options from BSS-TekLabs showing different padding amounts
  3. User selected Option 2 (200px left/right padding)

Code Implementation:

@media screen and (min-width: 750px) {
  .featured-product.product--thumbnail {
    padding-left: 200px !important;
    padding-right: 200px !important;
  }
}

Status: Solution provided, awaiting user confirmation that the code works as intended.

Summarized with AI on November 6. AI used: claude-sonnet-4-5-20250929.

Hi,
Can someone help me in reducing the width of the product page and adding left and right padding, but only for the desktop view?

page link: https://libevada.myshopify.com/products/full-fundamental-bundle-all-6

storefront password: rtugha

Any help is greatly appreciated

1 Like

Hello @technase

Go to online store ---------> themes -------> actions ------> edit code------->theme.css
add this code at the end of the file.

@media only screen and (min-width: 769px) {
.page-width {
padding-left: 100px; /* you can adjust the padding according to your requirement*/
padding-right: 100px;
}
}

result

If this was helpful, hit the like button and accept the solution.
Thanks

@media only screen and (min-width: 600px) {
    .main-content .page-width {
        padding-left: 10% !important;
        padding-right: 10% !important;
    }
}

Add this code to last line file theme.css @technase

  • Please press ‘Like’ and mark it as ‘Solution’ if you find it helpful. Thank you.

Thank you but it changes all the pages - I want only the product form area to be reduced.

Can we only add padding to the area on the screenshot below. I don’t want to add padding to all the pages, just want to add it to the selected area on desktop view

1 Like

Hello @technase

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

@media screen and (min-width: 990px) { div#shopify-section-template--22985094299983__main-product .page-width { padding: 0 10% !important; } }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

option 1

option 2

Do you want option 1 or 2? @technase

Option 2 please

Code for option 1:

@media screen and (min-width: 750px) {
    .featured-product.product--thumbnail {
            padding-left: 70px !important;
    padding-right: 70px !important;
    }
}

Code for option 2

@media screen and (min-width: 750px) {
    .featured-product.product--thumbnail {
            padding-left: 200px !important;
    padding-right: 200px !important;
    }
}

@technase please check it!