Site logo

Archived topic

Scrolling Text Overflow in a particular grid with fixed height

13 replies · Started by Karan on January 11, 2023

Viewing posts 1–14 of 14

I want to create a 2 grid container, 1st container will have image, and 2nd container will have title and scrolling text with fixed height and size. The text should not overflow the main container.

Yes, i have created the grid blocks. here is the link.

Hi there,

can you provide the published post URL, otherwise the link provided would require a login.

Yes, here is the published URL.

As a side note, in GB 1,7 which is just about to go to alpha release, you will be able to do this in the GB blocks without CSS.

For now:

1. Add this CSS to your site:

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

Change the height value to suit your needs, but keep the !important.

2. Select the Container Block you want to have scroll, and in Advanced > Addtional CSS Class(es) add: overflowy

Thank You David For your Answer. It was working.

How can i change the layout specifically for tablet. As The inner container layout is 1400 for the laptop and in tablet the content is getting out of the screen. So i want to change the layout for tablet. Please guide me with it.

Can you share a screenshot of the issue ?

Please check the screenshots.

Hi Karen,

This is normal behaviour.

This is as much as i can advise:

https://www.screencast.com/t/pDj3QG0Xdofl

Note that the Container Block that the ribbon heading is inside needs to have a min-height ( which can be set in the block editor ). That min-height needs to match the height of ribbon which is set in the CSS. In my example i set them both to 80px.
It then requires more width to make the ribbon wider to show more text.

But you will need to tweak those settings.

There is not much more we can advise on, this is custom CSS it is very tricky and its placement is affected by many different factors. It will be a nightmare to make responsive, so you may want to consider a less complicated design

Thank you for helping me with this David. But i think applying this will be bit complicated for me.

How can i create a template for a post? Like you can see the link. So that whenever, I create post i don't have to create those boxes with same size and spacing again and again, in every post.

Ok.

Can you create a new topic so we can these separate.

This archived topic is closed to new replies.