Archived topic
How To Vertically Align Multiple Grid Container Buttons
7 replies · Started by Brent Wilson on March 23, 2022
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.
Hi Brent,
Any chance you can link us to the site in question and point us to where we should be looking at?
You can use the private information field.
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
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 :)