Site logo

Archived topic

How to center background image on mobile devices and Tablets?

5 replies · Started by Suleyman on August 9, 2021

Viewing posts 1–6 of 6

Hi Leo,

I have added the web site in the private box.

Hi there,

If you are using GB Pro, you can set a background image and position for mobile/tablet specificlly by clicking the advance option.

If you are not using GB pro, try this CSS, adjust the value for x and y direction:

/*tablet*/
@media (max-width: 767px) {
    .home .gb-container-d3fd7850:before {
        background-position-x: 30%;
        background-position-y: 50%;
    }
}
/*mobile*/
@media (max-width: 420px) {
    .home .gb-container-d3fd7850:before {
        background-position-x: 30%;
        background-position-y: 50%;
    }
}

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

Hi,

thank you so much.

You are welcome :)

This archived topic is closed to new replies.