Archived topic
Bottom Align Last Element In Custom Archive Template
5 replies · Started by Ian on August 24, 2022
I know this is a GB question but that forum does not have a function to provide login creds as this site is still in development. Would it be ok to get some help here?
In short, I have a custom content template that targets All Archives. I am looking to pin the Author and Date to the bottom of the container. Is that possible?
Also, is there a way to make this equal height in GB? I can only find a minimum height to make this work inside the Content Template.
Any advice would be greatly appreciated.
Hi there,
on that archive content template could you:
1. remove the min-height from the container.
2. remove the align-bottom class
Once thats done i can take a look at some CSS, its more tricky then what you have on the home page due to the nested container blocks, so we will need a different CSS solution for it.
Hi David, thank you so kindly! I have removed align-bottom and min-height. The goal is to pin Author / Date to the bottom of equal height containers. Thank you!
Ok, try:
1. Add this CSS:
.same-height,
.same-height > .gb-inside-container {
height: 100%;
display: flex;
flex-direction: column;
flex: 1;
}
.same-height .same-height > .gb-inside-container :last-child {
margin-top: auto;
}
2. Edit your Content Templates.
There is a top level Container Block and there is a nested Container Block that has the Title, Excerpt, Meta inside.
You need to give both those Container Blocks as CSS class of same-height
David. Your are a magician! Thx for the detailed instructions. This was super helpful, so awesome and totally worked!!! As usual and most appreciated!
Happy to be of help!