• Hi Everyone,

    I’ve got an odd problem and I’m wondering of this group could help.

    Running Twenty Seventeen obviously, on WordPress 5.6

    I’ve made the content a bit wider, by adding some custom CSS that I’ve found online. That seems to work fine. (I’ve tried a few different snippets of code and the results all seem the same)

    All my uploaded images are resized to around 1920×1080.

    If my gallery block has more than 1 image the gallery is the same width as the rest of the content and perfect. But If my gallery only has 1 image, then it is smaller, say about 75% of the width. Add a second image to a gallery, it is full width, remove so only 1 image, it’s small again.

    If rather than a gallery, I use an image block then it appears full width too, trouble is I have 100’s of posts, probably all of them have a bunch of single images and I’d prefer not to need to edit each one.

    Happy to share a link of the page if anyone thinks it will help.

    Cheers
    Darro

Viewing 1 replies (of 1 total)
  • Thread Starter darro

    (@darro)

    Further to this, I found a snippet of CSS code below

    .wp-block-gallery {
        max-width: 100%;
        margin-left: 0;
    }

    If set to say 50%, this will shrink all galleries to about half the width of the post as expected. If I set it to 100% then all galleries with more than 1 image will be full post width, but single image galleries still are only about 75% or so of the post width. I’ve reviewed the resulting code, and really can’t see any difference.

Viewing 1 replies (of 1 total)

The topic ‘Single Image in Gallery not full Width’ is closed to new replies.