Site logo

[Resolved] Alignment issue blocks with GP and generateblocks

Home Forums Support [Resolved] Alignment issue blocks with GP and generateblocks

Home Forums Support Alignment issue blocks with GP and generateblocks

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2457668
    Rohan Verma

    Hello i have been using GP premium and GB pro for last few years. I have made a homepage using the Query loop block. But the main issue is some texts are not aligned properly. I am currenly showing 3 post per raw (grid view). Meta portion of the posts blocks are not aligning. Here is a screenshot: https://tinyurl.com/2jxexglx. And on archive the blocks are not of same size as well.

    Please help me. Thanks

    #2458263
    Ying
    Staff
    Customer Support

    Hi there,

    Try this CSS:

    .home .gb-query-loop-item > .gb-container >.gb-inside-container {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .home .gb-query-loop-item > .gb-container >.gb-inside-container > *:last-child {
        margin-top: auto;
    }
    #2458468
    Rohan Verma

    Thanks that worked pretty well. Now same thing I need for the archive as well which I have set with generateblock. I have attached the link inn the private box.

    #2458491
    Fernando
    Customer Support

    Hi Rohan,

    You can try adding this custom CSS as well:

    .archive .dynamic-content-template .inside-article > .gb-container, .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container, .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper, .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper .gb-container, .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper .gb-container .gb-inside-container {
        height: 100%;
    }
    
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper .gb-grid-column > .gb-container > .gb-inside-container {
        display: flex;
        flex-direction: column;
    }
    
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper .gb-container .gb-inside-container > *:last-child {
        margin-top: auto;
    }

    In the upcoming update of GenerateBlocks, you’ll likely be able to do this with no custom code needed.

    #2458517
    Rohan Verma

    Thank you Ying and Fernando, the solutions worked great. We will be waiting for the next generateblock update.

    #2458518
    Fernando
    Customer Support

    You’re welcome, Rohan!

    #2458569
    Rohan Verma

    Hello I made some changes to the block. Now Fernando your css is not working. On homepage everything seems allign but on archive metas are not allign properly in the grid. can you check.

    #2458576
    Fernando
    Customer Support

    I see. Place the Author and the Date Blocks inside one GB Container first if you want them in the same line. We’ll alter the code afterward.

    #2458614
    Rohan Verma

    Already under single GB Container: https://tinyurl.com/2fahe3ud

    #2458623
    Fernando
    Customer Support

    Alright. Can you try this code instead?:

    .archive .dynamic-content-template .inside-article > .gb-container, 
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container, 
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper, 
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper > .gb-grid-column > .gb-container, 
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper > .gb-grid-column > .gb-container > .gb-inside-container {
        height: 100%;
    }
    
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper > .gb-grid-column > .gb-container > .gb-inside-container {
        display: flex;
        flex-direction: column;
    }
    
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper > .gb-grid-column > .gb-container > .gb-inside-container > *:last-of-type {
        margin-top: auto;
    }

    Let us know how it goes.

    #2458653
    Rohan Verma

    Hello Fernando this worked for us “*:last-child” inplace of “*:last-of-type

    .archive .dynamic-content-template .inside-article > .gb-container,
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container,
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper,
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper > .gb-grid-column > .gb-container,
    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper > .gb-grid-column > .gb-container > .gb-inside-container {
    height: 100%;
    }

    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper > .gb-grid-column > .gb-container > .gb-inside-container {
    display: flex;
    flex-direction: column;
    }

    .archive .dynamic-content-template .inside-article > .gb-container > .gb-inside-container > .gb-grid-wrapper > .gb-grid-column > .gb-container > .gb-inside-container > *:last-child {
    margin-top: auto;
    }

    #2459720
    Fernando
    Customer Support

    I see. Glad you got it working!

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