Site logo

Archived topic

Picture Size in Mobile view

8 replies · Started by Klaus on November 3, 2021

Viewing posts 1–9 of 9

Could you kindly have a look at this page in mobile view: https://anja-schoenfuss-schattentherapie.de/ueber-mich/

In Mobile View:
I want the picture to match the width of the screen. How can I do this?

In desktop view the picture is set as a float-left class with a size of 390x390px.

Many thanks
Klaus

Hi there,

are you wanting to remove the padding ( white space ) around the image, so it extends to the edge of the browser viewport?

Yes this is exactly what I want. I succeeded with reducing the padding set in the customiser but this seems to work only if I set up the picture aus background picture.
Where is my mistake?

yes this is correct.

But please have a look at this page: Anja-schoenfuss-schattentherapie.de. I refer to the picture of the lady. I have no damn clue why this picture still has the white space....

Picture and text are set up a grid wrapper. I managed the issue for all pictures except this one

Add this CSS to your site:

@media(max-width: 768px) {
    .no-mob-padding {
        margin-left: -20px;
        width: calc(100% + 40px);
    }
}

Then select the Image Block and in Advanced > Additional CSS Class(es) add: no-mob-padding

Thanks David,

is there some time to explain what is going on there? Is this my mistake? What is it that I do not understand??

BR
Klaus

BTW: it works. As expected :-).

Not issue on your part.
The image and the other content sits inside a container block that has padding.
You could remove the container blocks padding on mobile BUT that would mean ALL the content in the container would touch the sides of the screen... so we have to treat the image with a little CSS to fix that :)

Glad to be of help!

This archived topic is closed to new replies.