Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I have had to make 2 different pictures of my desktop and mobile version of the banner. The original banner that was in the dawn theme had a button already installed on the banner, which I used for Desktop version. I had trouble installing a button for the mobile banner onto the image version so i edited my banner image and created a button on the image. can someone please help me make that button clickable? I need the shop now button for mobile to click onto "all products" page. TIA
moimeme.com.au
Kbf295GhpF113
Can you help with a custom code for it?
Hi,
Need to modify the HTML and CSS for the mobile banner
Open appropriate section file where mobile banner code is located and add Overlay
Code example
<div class="mobile-banner">
<img src="{{ 'your-mobile-banner-image-url-here' | asset_url }}" alt="Banner Image" class="mobile-banner-image">
<a href="/collections/all" class="mobile-banner-button-link"></a>
</div>
Add CSS for the clickable button overlay
Code example
.mobile-banner {
position: relative;
display: inline-block;
}
.mobile-banner-image {
width: 100%;
height: auto;
}
.mobile-banner-button-link {
position: absolute;
top: 50%; /* Adjust this value based on the location of your button in the image */
left: 50%; /* Adjust this value based on the location of your button in the image */
transform: translate(-50%, -50%);
width: 200px; /* Adjust width to match the button size */
height: 50px; /* Adjust height to match the button size */
display: block;
z-index: 10;
}
Adjust the Overlay Position
Hi thanks for your reply. could you help with a custom code?
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey 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, 2024