Take Away Boarder Outline on Main Product Page Photo

Topic summary

A Shopify store owner needed to remove the border outline appearing around the main product image on both mobile and desktop views.

Initial Solutions:

  • Early CSS suggestions targeting .global-media-settings and .product-media-container worked on desktop but failed on mobile devices.

Working Solution:
The issue was resolved by adding custom CSS through the Shopify theme customizer:

  1. Navigate to Online Store → Themes → Customize
  2. Access the product page
  3. Click “Product information” section
  4. Paste the following code in the “Custom CSS” field:
.product .product-media-container {
    border: none !important;
}

This approach successfully removed the border on both mobile and desktop platforms. The solution was confirmed working by the original poster.

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

Please help with how to remove this outline on mobile & desktop around main photo only product page.

1 Like

@babystore123 - can you please share this page link?

Here is a product page: https://babybliss.co/products/silicone-suction-plate

@babystore123 - please add this css to the very end of your base.css file and check

.global-media-settings{border: none;}

Yes! But not on mobile :disappointed_face:

Please add this code at the bottom of your base.css file

.product-media-container.constrain-height.media-fit-contain {
border: unset !important;
}

Doesn’t work for mobile for some reason :disappointed_face:

@babystore123 Please follow below steps to remove the border from main product image. Let me know whether it is helpful for you.

  1. From admin, go to “Online Store” → “Themes” → “Customize”.
  2. Go to product page.
  3. Click “Product information” section and paste the below code in “Custom CSS” field.
.product .product-media-container {
    border: none !important;
}

Result will be,

Please provide your support by click “Like” and “Accepted” if our solution works for you. Thanks for your support.

Worked! Thank you so much!!!