A Shopify store owner is experiencing mobile responsiveness issues where image banners are cropped and buttons/text overlap, while the desktop version displays correctly.
Root Cause Identified:
Text is embedded within banner images rather than being separate HTML elements
Images use object-fit: cover property, causing cropping on mobile devices
Solutions Provided:
Use separate images optimized for mobile and desktop
Extract text from images and add via HTML for better responsive behavior
Apply object-fit: contain to prevent cropping (though this creates height fitting issues)
CSS Fixes Applied:
Custom media queries added to base.css to adjust banner padding and minimum height on mobile
Additional code provided to resize oversized buttons on mobile devices
Positioning adjustments made using absolute positioning
Current Status:
The image cropping issue is partially resolved, but button sizing problems persist. A secondary page (/pages/vela-aromatherapy) also has overlapping text alignment issues on mobile that require additional fixes. The helper is providing iterative CSS solutions to address each problem as it’s identified.
Summarized with AI on November 1.
AI used: claude-sonnet-4-5-20250929.
I have analyzed the website and the main problem is that the text is not a seperate entity and is a part of the image and on mobile the image is set to cover that is why it is covering the whole banner space.
There are two solutions to this problem:
Use separate images for mobile and desktop.
Remove the text from image and add it through html so that it will adjust itself on mobile (currently only the button is part of the html, rest is the image).
Thanks for responding. But even if the text is a part of the image, the image shouldn’t get cropped right? I want the whole width of the image. and placement of the button to be right
Yes you can do that if you add the object-fit: contain property to the banner image.
But the problem is the images will not fit the height of the banner as you can see in below image so you have to reduce the size of the banner as well.