• Resolved And1rzej

    (@and1rzej)


    it is possible GRID with two columns, where first image are bigger, and second image are 50% smaller, both in the same row, but smaller image must be align to the center of the bigger in Modula gallery? (client’s fantasy).

    I got this code from AI:
    but of course .classes{} in Modula are quite different:

    [css:]
    .gallery {
    display: grid;
    grid-template-columns: 2fr 1fr; /* First column is twice as wide as the second column / gap: 10px; / Gap between grid items */
    }

        .gallery img {
            width: 100%;
            height: auto;
            display: block;
        }
    
        .smaller {
            align-self: center; /* Align the smaller image to the center vertically within its grid cell */
        }

    [html:]
    Gallery


    Larger Image
    Smaller Image




Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP Chill

    (@wpchill)

    Hi, @and1rzej – currently, it’s not possible. What you’ve shared above is some CSS code for a CSS-based “grid”.

    Unfortunately, galleries are not that simple. Here’s some questions:
    – what happens on mobile/tablet devices?
    – what happens when the user rotates from portrait to landscape a mobile device?
    – will the images uploaded already be cut to size OR should WordPress crop them?

    Just a few of the basic questions to ask your client BEFORE moving on with this.

    /Cristian.

    Thread Starter And1rzej

    (@and1rzej)

    I agree. (resolved)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘grid with 2 columns’ is closed to new replies.