We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: Help Needed: Preventing Banner Image from Flashing on Mobile

Solved

Help Needed: Preventing Banner Image from Flashing on Mobile

Felix_Ghys
Excursionist
29 0 6

Hi everyone,

 

My site is fully built with a desktop-first approach, and I used custom coding (with help from this community) to hide the banner image when the site is viewed on mobile. 

 

However, when the site is opened on a mobile device, the banner image still briefly appears for about 0.2 seconds before disappearing. This flash can be distracting and may negatively affect user experience.

 

Ideally, I want the banner image to be completely hidden on mobile without showing at all, since it doesn’t scale well and the mobile version of the site looks much better without it.

 

Does anyone have suggestions on how to prevent this banner image from flashing when the page loads on mobile? I'd really appreciate any advice or guidance on how to fix this.

 

website link: https://matubucoffee.be/

 

Thanks in advance for your help!

Accepted Solution (1)

Laza_Binaery
Shopify Partner
545 87 152

This is an accepted solution.

Hi @Felix_Ghys 

 

Try this:

  • in that banner section, under Custom CSS , add 

 

.image-section {
    display: none;
}

@media (min-width: 769px) {
    .image-section {
        display: block;
    }
}​

This code is for just that section and it should help with flashing on mobile.

 

  • and also remove code from theme-index.css 

 

@media (max-width: 768px) {
    .image-section.image-section--template--19897395708229__694cf2ae-142b-4bd4-8155-40f7816be418.image-section--large.wow.animated {
        display: none !important;
    }
}
}​

note it had an extra } there, also. 

 

 

Kind regards
Laza
www.binaery.com

View solution in original post

Replies 2 (2)

Laza_Binaery
Shopify Partner
545 87 152

This is an accepted solution.

Hi @Felix_Ghys 

 

Try this:

  • in that banner section, under Custom CSS , add 

 

.image-section {
    display: none;
}

@media (min-width: 769px) {
    .image-section {
        display: block;
    }
}​

This code is for just that section and it should help with flashing on mobile.

 

  • and also remove code from theme-index.css 

 

@media (max-width: 768px) {
    .image-section.image-section--template--19897395708229__694cf2ae-142b-4bd4-8155-40f7816be418.image-section--large.wow.animated {
        display: none !important;
    }
}
}​

note it had an extra } there, also. 

 

 

Kind regards
Laza
www.binaery.com
Felix_Ghys
Excursionist
29 0 6

Thank you so much! 

This worked like a charm.