Mobile Background Image Change

Hello,

I’ve tried everything that was in the past forums and nothing works.
I have the code below, and the class bg-image on the existing background image in my first section of the homepage.
And when i go to mobile, it flashes the correct BG image for a half-second before reverting to the original desktop image.

@media (max-width: 480px){
.bg-image {
background-size: contain !important;
background-image: url(http://growthgameplan.com/wp-content/uploads/2019/10/GGP-Mobile-BG-V1.jpg);
}
}

please help!

Jesse

Hi Jesse,

Thank you for writing in, try updating your selector to this:

@media (max-width: 480px){
.bg-image .x-bg-layer-lower-image {
		background-size: contain !important;
		background-image: url(http://growthgameplan.com/wp-content/uploads/2019/10/GGP-Mobile-BG-V1.jpg) !important;
	}
}

You can find the proper CSS code selector using the Chrome browser Developer Toolbar
For the CSS code itself, I suggest that you get started with this tutorial

Hope it helps,
Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.