Site logo

Archived topic

How To Vertically Align Multiple Grid Container Buttons

7 replies · Started by Brent Wilson on March 23, 2022

Viewing posts 1–8 of 8

If I have a grid of side-by-side containers, and each container has a button below some text, how can I get the buttons to align vertically when the text above them may be different lengths? See screenshot for example of the issue.

https://pasteboard.co/pQNrskSZWACZ.png

See private information section.

Try this:

.gb-grid-wrapper.gb-grid-wrapper-88f8cde3 .gb-container > .gb-inside-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.gb-grid-wrapper.gb-grid-wrapper-88f8cde3 .gb-container > .gb-inside-container > *:last-child {
    margin-top: auto;
}

That seems to work nicely!

So to apply this to other grids, I would just need to change the grid wrapper id portion of this CSS, right?

Thanks!

So to apply this to other grids, I would just need to change the grid wrapper id portion of this CSS, right?

If the Grid structure is similar, then it's correct :)

Thanks!

No problem :)

This archived topic is closed to new replies.