Site logo

Archived topic

Background image size on mobile.

9 replies · Started by Broc on November 26, 2018

Viewing posts 1–10 of 10

Is there a way to adjust the background image size for mobile devices so that it displays similar to that on laptops/desktops? The mobile background displays extremely zoomed-in. I tried the 100% width, but that didn't work properly. Thanks.

This is how it looks on my laptop. https://i.imgur.com/BuqqhEH.png

This is how it looks on my iPhone. https://i.imgur.com/dIixx0h.jpg

Hi there,

Background images aren't responsive by nature. I would recommend setting one specific for mobile using this CSS:

@media (max-width: 768px) {
    body {
         background-image: url(http://MOBILE-IMAGE-URL);
         background-size: auto;
    }
}

Adding CSS: https://docs.generatepress.com/article/adding-css/

Let me know if this helps :)

Is there a way to make the image fixed?

It should be already fixed no?

Keep in mind you have a long image.

It was repeating and wasn't fixed. It scrolls as I scroll. I want it to stay fixed.

I now see just a background color?

Honestly that's a good solution. Hard to make background image looks good on mobile.

This archived topic is closed to new replies.