Site logo

[Resolved] Image Gallery Stack on Mobile

Home Forums Support [Resolved] Image Gallery Stack on Mobile

Home Forums Support Image Gallery Stack on Mobile

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2533825
    SLIM

    I’d like to PREVENT the image gallery from stacking on mobile.

    I’ve set the columns to 6 (as i’m displaying 6 icons) which is very doable on a mobile screen.
    However, on mobile it keeps switching it to TWO columns.

    I tried editing WHILST in mobile view and there does not seem to be a separate editor for it?

    Thanks.

    #2533981
    David
    Staff
    Customer Support

    Hi there,

    add this CSS to your site:

    figure.wp-block-gallery.grid-of-six {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
    }
    
    .wp-block-gallery.grid-of-six  figure.wp-block-image {
        width: 100% !important;
    }

    then in the editor, select the Gallery Block, and in Advanced > Additional CSS Class(es) add: grid-of-six
    any gallery with that class should now remain 6 columns on all devices.

    #2534797
    SLIM

    My man! 🙂
    Thank you.

    Works flawlessly.

    #2535364
    David
    Staff
    Customer Support

    Glad to hear that

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.