[Resolved] Vertical Alignment of Items Within Containers

Home Forums Support [Resolved] Vertical Alignment of Items Within Containers

Home Forums Support Vertical Alignment of Items Within Containers

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2220664
    Brent Wilson

    In grid of containers with different lengths of text in them, I want to move the bottom elements down to all be the same distance from the bottom. What do I need to do in order to achieve this?

    https://paste.pics/235eacc8b48d2a594b769e1ac0bbd83b

    #2220920
    David
    Staff
    Customer Support

    Hi there,

    try the following CSS:

    .gb-query-loop-item .gb-container {
        height: 100%;
    }
    .gb-query-loop-item .gb-inside-container {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    .gb-query-loop-item .gb-inside-container .gb-inside-container :last-child {
        margin-top: auto;
    }
    #2221393
    Brent Wilson

    That CSS doesn’t seem to be working for me. Any other ideas?

    #2221397
    David
    Staff
    Customer Support

    Where did you add the CSS?

    #2221398
    Brent Wilson

    I added it temporarily in the Customizer Additional CSS field.

    #2221404
    David
    Staff
    Customer Support

    Can you add it back in there, and clear any caches, and then let me know so i can see whats going on .

    #2221406
    Brent Wilson

    Done.

    #2221414
    David
    Staff
    Customer Support

    Ok, so the CSS before it is inside a media query and its missing a closing } bracket
    Add that bracket in:

    2022-05-16_17-27-44

    Then the CSS will work on all screen sizes

    #2221419
    Brent Wilson

    Ooops. Thanks for catching that. It appears to be working now.

    It appears that this CSS is pretty general (no IDs, etc.). So theoretically, this should work on GB query loops on other pages as I add them, right?

    #2221427
    David
    Staff
    Customer Support

    Yeah it will work on any of the gb-query-loop-item containers that use the same layout ie. One where you have Container nested within a container. And its that nested container that needs its last child aligning.

    #2221431
    Brent Wilson

    Thanks David! I appreciate your help on this!

    #2221987
    David
    Staff
    Customer Support

    You’re welcome

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