[Resolved] Bottom Align Last Element In Custom Archive Template

Home Forums Support [Resolved] Bottom Align Last Element In Custom Archive Template

Home Forums Support Bottom Align Last Element In Custom Archive Template

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2322141
    Ian

    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.

    #2322181
    David
    Staff
    Customer Support

    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.

    #2322495
    Ian

    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!

    #2322645
    David
    Staff
    Customer Support

    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

    #2322661
    Ian

    David. Your are a magician! Thx for the detailed instructions. This was super helpful, so awesome and totally worked!!! As usual and most appreciated!

    #2323283
    David
    Staff
    Customer Support

    Happy to be of help!

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