Hello. How to remove the border

Topic summary

A user seeks help removing borders from product images on their Shopify store to match a desired appearance shown in reference screenshots.

Initial Solution Provided:

  • Add CSS code to base.css, style.css, or theme.css in the Assets folder
  • Code targets .product-media-container.constrain-height.fit-contain-media with width: 100% property

Follow-up Issue:
After implementing the first solution, an upper border remains visible on mobile screens (shown in second screenshot).

Additional Fix:
A mobile-specific CSS solution was provided:

  • Uses media query for screens max-width 749px
  • Targets .section-template--23175415890247__main-padding with padding-top: 0

Status: The discussion appears ongoing, awaiting confirmation if the mobile border fix resolves the remaining issue. Both solutions involve adding CSS code snippets to the theme files through Shopify’s admin dashboard.

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

Hello. How to remove the border so that it looks like the first photo

1 Like

Hi @Alex31

Pease, share store URL. Thanks!

https://devari.store/products/conrad-watch-copy

Thankks for the info, check this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
.product-media-container.constrain-height.media-fit-contain {
    width: 100% !important;
}

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!

1 Like

Thank you very much for your help. You can somehow remove the upper border?

This is only for the mobile screen right? Please, add this code where you paste it. Thanks.

@media only screen and (max-width: 749px){
.section-template--23175415890247__main-padding {
    padding-top: 0;
}
}

And Save.

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!