Site logo

[Support request] How to fix the height of the grid?

Home Forums Support [Support request] How to fix the height of the grid?

Home Forums Support How to fix the height of the grid?

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #2506865
    Karan

    Hello

    If i have 2 column grid, and in the right side column i have more content. so, the height is increasing the over all grid. Which i don’t want. In the right side column i want the heading to be fixed, even if i increase the heading word count. The container height shouldn’t increase.

    Please check the screenshot for understanding my issue.

    #2507062
    David
    Staff
    Customer Support

    Hi there,

    so do you want the height of the Bottom Container to shrink when the top Containers height increases ?
    And if so, should the Top containers content also scroll ?

    If thats the case, then you would need to combine the content of both containers.

    #2507144
    Karan

    I don’t want the top container to scroll. please check this sample website.

    Please check both the link. In the Screenshot i have marked it as red. and in the 2nd url when you will scroll down you will find that area.

    You will see the content in the heading is fixed and also not effecting the bottom container height.

    #2509397
    Karan

    Please answer my question…?

    #2509403
    Fernando
    Customer Support

    Hi Karan,

    Sorry for the late response. We weren’t alerted by your previous response. It may have slipped through our system.

    To clarify, do you want a specific max height for this section: https://share.getcloudapp.com/E0uRO79K but you don’t want it to scroll?

    If you want this, are you open to trimming the text?

    #2509711
    Karan

    Yes, i want it of specific height.

    #2509747
    David
    Staff
    Customer Support

    You can try:

    1. Add this CSS to your site:

    .line-clamp {
        -webkit-box-orient: vertical;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
    }

    Note this property: -webkit-line-clamp: 2; this sets the number of lines it will display.

    2. Select the Headline block and in Advanced > Additional CSS Class(es) add: line-clamp

    #2510011
    Karan

    Thank you David for your reponse. It helped me a bit.

    But my main concern is that. the below height should be align with “Get On Amazon” button, I have set the overflowy height according to that. But it is getting expanded. Please check the Screenshot for more understanding.

    #2510076
    David
    Staff
    Customer Support

    The height of the scroll container can’t automatically update based on the height of that title.
    It would require JS and get very messy.

    I would approach it lie so …. OK, trust me on the following steps:

    1. Select the Container Block that has the Headline and author text inside it.
    1.1 In its Spacing add 5px bottom padding. And a 1px bottom border.
    1.2 Set the Advanced > Additional CSS Classes to line-clamp sticky-header
    1.3 Now move the container inside the overflowy Scroll container

    2. Delete the Container with the Separator – as the border added to the above container will replace that.

    3. Select the overflow scroll container and give it some bottom padding, so it doesn’t touch the border below it.

    4. Add this CSS:

    .sticky-header {
        position: sticky;
        top: 0;
    }

    4. Edit this CSS:

    .overflowy {
        height: 262px !important;
        overflow-y: auto;
    }

    And increase the 262px to compensate for the Header inside it.

    This will make the header sticky, so it will not scroll and you can control the overall height of the grid.

    #2510721
    Karan

    Thanks David for this information. It is working. But there is a problem. The below container contents are getting overlay to the heading part.

    Please check the screenshot and the url for better understanding.

    #2511341
    Ying
    Staff
    Customer Support

    Hi Karan,

    You can set a background color for the heading part.

    #2511726
    Karan

    Thanks Ying. But is there any other way of doing it because i don’t want to put any background into it.

    #2511850
    David
    Staff
    Customer Support

    There isn’t an alternative method unfortuately. There is no magic method to adjust the height of two separate containers.

    #2512183
    Karan

    Thank You David for your information.

    #2512802
    David
    Staff
    Customer Support

    You’re welcome

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