Site logo

Archived topic

Adapt page header image in mobile

24 replies · Started by Eloy on December 14, 2021

Viewing posts 16–25 of 25

Thank you :)

Which size do you recommend?

You may need to experiment a little but you ideally want to crop the image so its more portrait - see the red outline for example:

https://www.screencast.com/t/MevlXkgtA

Image dimensions as an example: 768px wide x 1366px high.
That the dimensions of popular screen sizes.

Thank you very much.

I'm going to do some tests and if I'm not convinced maybe I'll buy GenerateBlocks Pro. Because there is no other option to do it, right?

CSS should work, but if you are not comfortable with CSS, GB pro offers built in options for this.

Thanks.

And the only code I can add in CSS is this, right? ->

@media(max-width: 768px) {
    .gb-container.home-hero-image:before {
        background-image: url('the_full_url_to_your_mobile_image/image.jpg');
    }
}

Yes - Thats the only CSS you require to change that Containers background image.

I've been doing tests and now it looks much better. I'll keep trying to see if I can find a better way to display.

Thank you very much for your help!!!!! :) :) :)

Glad to be of help!

This archived topic is closed to new replies.