Hi, I saw this was answered about a year ago, I tried it and the image is not populating on mobile, could you please advise what i did wrong?
Code I added to assets, section-image-banner.css
.banner__media:first-child {
width: 100%;
}
.banner__media+.banner__media {
display: none;
}
@media screen and (max-width: 749px) {
.banner__media:first-child {
display: none;
}
.banner__media+.banner__media {
width: 100%;
display: block !important;
}
}
I saved it, and its doing something because I uploaded an image to the second area and it is not showing in desktop, so half the work is done. and here is the site I tried it on so I did not mess up the live site-
https://e2bzvzynxqmrjpi7-79280701732.shopifypreview.com
I added the second code and I can see it in the customize mode but when I preview with my mobile device is shows the desktop banner. Does anyone know why, and how I can fix it?
Stop replying to content, scammers are not tolerated on here!
Hello @LIVINGSIMPLY ,
The code you use is related to manage the display of banner images in a responsive manner. It’s designed to show a different image on mobile devices and hide one of the images on smaller screens. You can add this code in the Assets folder
.banner__media:first-child {
width: 100%;
}
.banner__media+.banner__media {
display: none;
}
@media screen and (max-width: 749px) {
.banner__media:first-child {
display: none;
}
.banner__media+.banner__media {
width: 100%;
display: block !important;
}
}
Hope this can help.
Transcy
I’m trying to show a different image for mobile that desktop. It’s not optimizing how it should. So it will be easier to have two separate banners/images.
the code you gave me will do this? Where in the assets folder do I put it?
Sorry I realized the code you gave me is what I already input into my assets folder, in the banner, as stated in my original question, am I supposed to put it somewhere as well?