All things Shopify and commerce
I'm working with the Symmetry theme and need help setting up a different main banner for tablet on my homepage. We already have separate images for mobile and web, and they display correctly. However, on tablet, the banner image overlaps with the text, so we want to upload a completely separate banner specifically for tablet devices. Can anyone assist with this?
Hello @avaskye
Go to Online Store > Themes > Actions > Edit Code.
Open the sections/hero.liquid (or whichever section controls the homepage banner).
Add a new image field for the tablet banner in the section schema (if it doesn’t exist).
Example of a schema addition to allow tablet-specific image upload:
Then, in the Liquid code, modify the section to display the appropriate image based on the device type:
Now, use CSS to display the correct image based on the screen size:
Open your theme CSS file (base.css, theme.css, or similar).
Add the following CSS code to control which image is displayed:
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024