Site logo

Archived topic

Same width of photos on mobile

7 replies · Started by reistad on March 6, 2022

Viewing posts 1–8 of 8

I have one page where I want the same width of photos on mobile.
That works fine on desktop and Ipad but not on mobile.

Is there a CSS I can use for that?

The page is: https://wfsf.org/past-officers/

Hi there,

are you wanting to keep the text to the right of the image as well ?

No. It would be best to have the text beneath the picture. It is may be a specific class or id I could use for that post to give a CSS for the mobile version.

A quick CSS fix for that page would be this:

.postid-29 .wp-block-image {
    max-width: 140px;
}

Since this is only a problem for the mobile version.
May be a "CSS @media Rule" like the one below will fix the problem for this specific post?

@media only screen and (max-device-width: 480px) {
.postid-29 .wp-block-image {
max-width: 140px;
}

}

For sure you can apply it within that Media query :)
I would probably use this:

@media(max-width: 768px) {
    .postid-29 .wp-block-image {
        max-width: 140px;
    }
}

Thank you David! Worked perfect.

Glad to hear that!

This archived topic is closed to new replies.