Site logo

[Resolved] Last Child Item at Bottom of Loop Tempalte

Home Forums Support [Resolved] Last Child Item at Bottom of Loop Tempalte

Home Forums Support Last Child Item at Bottom of Loop Tempalte

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2400423
    Ian

    Had to add an extra container to make this loop template work. Is there an easy way to use custom css to stick the bottom container (date + author) to the bottom of the template? Creds provided below. Thank you kindly!

    #2400650
    Ying
    Staff
    Customer Support

    Hi Ian,

    Try this CSS:

    .gb-container.gb-container-8ec5a578 {
        flex: 1;
    }
    .gb-container-8ec5a578 >.gb-inside-container {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .gb-container-8ec5a578 >.gb-inside-container >*:last-child {
        margin-top: auto;
    }
    
    .gb-container-cc45efc4.gb-container-7bd0c8a0 > .gb-inside-container {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    #2400669
    Ian

    Wow Ying, thank you! Is there a way to use “Additional Class” to target various containers so we can run one set of css for all Query Loops on the site?

    #2400675
    Ian

    What do you think of this?

    .lower-container {
        flex: 1;
    }
    .lower-container >.gb-inside-container {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .lower-container >.gb-inside-container >*:last-child {
        margin-top: auto;
    }
    
    .template-container > .gb-inside-container {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    #2400683
    Ying
    Staff
    Customer Support

    Is there a way to use “Additional Class” to target various containers so we can run one set of css for all Query Loops on the site?

    It’s not possible, unless you are using the exact same layout for all your query loops.

    #2400691
    Ian

    For consistency, we will be using the same layout for most query loops. I think this works. Did I get this right?

    .lower-container {
        flex: 1;
    }
    .lower-container >.gb-inside-container {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .lower-container >.gb-inside-container >*:last-child {
        margin-top: auto;
    }
    
    .template-container > .gb-inside-container {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    #2401839
    Ying
    Staff
    Customer Support

    That’ll work 🙂

    #2401849
    Ian

    Thank you Ying! Much appreciated.

    #2402000
    Ying
    Staff
    Customer Support

    No problem 🙂

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