Product layout

Topic summary

A Shopify store owner seeks to remove padding around product images so they stretch to full screen width, sharing screenshots of the current layout versus the desired result.

Initial Solutions Provided:

  • Two support representatives (Artzen_tech and dws_pvt_ltd) offer CSS-based fixes involving:
    • Adding width: 100% to .product__media-item and .product-media-container classes
    • Removing the “page-width” class from the main-product.liquid file
    • Modifying section-main-product.css with specific padding and overflow adjustments

Follow-up Issues:

  • The original poster reports the first solution didn’t work due to persistent padding
  • After implementing suggested fixes, two new requests emerge:
    1. How to center the product text (currently left-aligned)
    2. How to make product images cover the full mobile screen width

Current Status:
The desktop layout appears resolved, but mobile optimization and text alignment remain open questions. The discussion includes code snippets and reference images throughout.

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

Hey,

can anyone help me make my product images bigger so that it stretches to the end of the screen rather than having padding. See an image below of my current store and what im hoping to achieve.

Any help would be unreal.

Ive attached my store URL at the bottom.

URL: https://project-thirteen.com.au

Hi @projectthirteen

Its Artzen Technologies! We will be happy to help you today.

You can follow the below css which I have mentioned. And check the result.

  1. Go to your Online Store
  2. Edit Code
  3. Find CSS File
  4. Add the following CSS
.product__media-item .product-media-container.constrain-height.media-fit-contain {
    width: 100%;
}

If my solution helped you, then please mark it as accepted.

Let me know if need further assistance
Regards,
Artzen Technologies

Hey @Artzen_tech sorry this didnt work

… it still has padding

Is there anything else I could try?

Hi @projectthirteen
You can do one thing, go to main-product.liquid file and remove page-width class from their.

And it will be full width

1 Like

Hello @projectthirteen , It can do it with some changes in the Code and Add/Edit CSS code.

Go to your product page section, in this above the div of class containing “product product–medium” there is a div with class name “page-width”, please remove that class only of the page-width. Add the below CSS in the product CSS file which is “section-main-product.css”. please find the CSS class with below code in that file and see the results.

.product.grid {
    overflow: hidden; /* add this new css */
    gap: 0;
}

.product-media-container.constrain-height.media-fit-contain {
    --contained-width: calc(var(--constrained-height)* var(--aspect-ratio));
    width; min(var(--contained-width),100%); /* remove or comment this css */
    width: 100%; /* add this new CSS */
}

@media screen and (min-width: 750px) {
    .product__info-wrapper.grid__item {
        padding: 0px 7rem 0 5rem; /* update this CSS */
    }
}

/* add this CSS at end of the file */
@media screen and (max-width: 749px) {
    .product__info-wrapper.grid__item {
        padding: 0 2rem 0 2rem !important; /* add this CSS */
    }
}

See the output below,

Feel free to reach out if you have any questions or need assistance.
Best Regards,
DWS.

thanks, do you know how to centre the text there instead of it sitting on the left?

Thanks for that, it looks great on mobile but would you know how to make the product image (only on mobile) cover the whole screen (like the below image)

Any help would be great.