Site logo

Archived topic

Background Image

20 replies · Started by Forum User on March 5, 2022

Viewing posts 1–15 of 21

I have a container block with a background image on my main page. On mobile the image doesn’t resize and just looks too zoomed in. https://magicalearthretreat.com

That helped but I thought you might be able to provide CSS like this specific to my site:

Hi Lunatrix,

Try this CSS:

@media (max-width: 768px) {
    .gb-container-2dc097b2:before {
        background-size: 1000px;
        background-position: left bottom;
    }
}

Is it possible to have a different background image for mobile? If yes, how?

Is it possible to have a different background image for mobile? If yes, how?

Here you go:

@media (max-width: 768px) {
    .gb-container.gb-container-d038e518:before {
        background-image: url(https://URL-HERE)
    }
}

Did I do this right? I ask because I do not see a difference.

@media (max-width: 768px) {
    .gb-container.gb-container-d038e518:before {
        background-image: url(https://magicalearthretreat.com/wp-content/uploads/2022/03/stock-photo-the-vintage-little-yellow-home-with-blue-door-on-the-green-lawn-in-the-beautiful-garden-hobbit-1106877812.jpg)
    }
}

Can you clear and disable any caching plugins or server caching you are using including SG optimizer?

Yes, everything is disabled.

No. It looks exactly the same.

I am using a unique image now but for some reason the original image keeps showing up. I have cleared all the caches and browsing history several times.

Can you share the current code you are using here?

Code?

This archived topic is closed to new replies.