How to make image smaller for mobile (Sense theme)

Topic summary

A user is experiencing an image banner display issue with the Sense theme on Shopify. The banner appears overly zoomed in on mobile devices while displaying correctly on desktop.

Initial Solutions Offered:

  • Two community members provided CSS code snippets to address the mobile display problem
  • One solution involved adding code to the theme.liquid file above the </body> tag
  • Another suggested modifying the main.css file with object-fit: fill and mobile-specific height adjustments

Current Status:

  • The mobile centering issue was partially resolved by adjusting padding to 200px
  • Mobile display now works correctly
  • New problem emerged: The desktop version now shows the image as overly stretched

Resolution Status:
The discussion remains ongoing with an unresolved desktop stretching issue. The user is seeking additional help to fix the desktop display without breaking the mobile version.

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

Hi! On my website the image banner is really zoomed in on mobile, but on desktop it looks fine (see screenshots attached). I’m using the sense theme - link is eggzworld.co.uk.

Appreciate any help on this, thanks!

1 Like

Hey @NekaJay

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

1 Like

Hi @NekaJay

Check this one.

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

.banner__media.media img {
    object-fit: fill;
}
@media screen and (max-width: 749px) {
    .banner--small:not(.banner--mobile-bottom):not(.banner--adapt) .banner__content {
        min-height: 40rem;
    }
}

And save.

result:

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

Hi Moeed,

Thank you for the quick reply! That looks better, but the image is not centered so I can see some of the background behind it. Is there a way to center it too?

Thanks!

Hey @NekaJay

Try this updated code instead and remove the previous code.


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

1 Like

Thank you again! I had to change the padding to 200px for it to be centered on my phone, but all good on mobile now!

Unfortunately on my desktop it’s now become super stretched, would you happen to know how to fix that?