A user encountered an issue with a horizontal banner image on their mobile homepage (Origin theme). The 3:2 image displayed correctly on desktop but appeared small with excessive white space on mobile devices.
Solution Provided:
Developer suggested adding custom CSS to the base.css file to set banner height to 600px on mobile screens using media queries
Initial implementation worked but affected other page elements (cropped images in a “solid gold” presentation section)
Refinement Process:
To target only the homepage banner, developer recommended adding a unique class name (“homepagebanner”) to the banner element in sections > image-banner.liquid (around line 56)
Updated CSS would then target this specific class instead of all banner elements
User initially struggled with proper HTML syntax when adding the class name, placing it outside the quotation marks
Developer corrected the syntax error by showing the class should be added inside the existing class attribute quotes
Resolution:
Issue successfully resolved after proper class implementation. The mobile banner now fills the screen appropriately without affecting other page elements.
Summarized with AI on November 15.
AI used: claude-sonnet-4-5-20250929.
Trouble adapting the banner image in the home page, for it to fill the screen in the mobile view…, thought about uploading a different photo for mobile view thats vertical, but couldnt work it around.
any ideas?
The issue is that de 3:2 image im using in desktop works perfectly but for the mobile view, it mantains proportions, result as a small horizontal photo and lots of white space in the bottom.
Could you provide me with the URL and Store password (if it’s applicable) and I can take a look.
From the information you’ve given the best option here, would be to build a separate image that shows on mobile so that it can have the proper dimensions and fit the screen correctly. I’m happy to assist you with this build if you need it.
Hey @bug , thanks! Are you talking about this white space outlined in the screenshot? If so, do you plan on adding anymore content to your home screen? If so this will allow the whitespace to be filled up by content.
If not, how much bigger do you want the home page image to be?
For Demo purposes I’ve made it to be 600px on mobile. To replicate this, you can add the following CSS into your main CSS file (base.css). Please add this at the bottom of the sheet!
Thanks a lot, it worked. The problem is that it also affectes a presentation that i have inside solid gold, the images are cropped. maybe what would work best is to add code to replace the banner image of the homepage only when its mobile, is there a way to do this?
Yeah so most likely the class names are shared so the above CSS then applies to all elements containing that class name. The easiest and quickest option would be to find this header element from within your code base (it will be named banner-image so something along those lines) and then add a classname to it such as homepagebanner (see screenshot)
Essentially what we are doing here is targeting this element on it’s unique class name so it doesn’t affect any other elements.
If you can’t find the file, send a few screenshots of this section from within the Theme Customizer and from the code base and I can assist further. Thanks!
Hey @bug , could you send me a screenshot of your Theme Customer please? I need to find out the section name and I can provide you with the exact location of the file