Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

How to make grid items scroll

  • anarchyforaardvarks

    Hello, I’ve seen this discussed before and saw this suggestion:

    “try adding this CSS:

    @media(max-width: 769px) {
    .gb-grid-wrapper.scrollable {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: mandatory;
    }
    .gb-grid-wrapper.scrollable .gb-grid-column {
    flex: 1 0 50%;
    scroll-snap-align: start;
    }
    }
    Then edit the Grid Container ( the parent wrapped ) and give it a CSS Class of: scrollable”

    But where are you supposed to add the grid CSS?

    I am trying to make grid items turn to a horizontal scroll, like as what happens with the grid here: https://sugardaddyy.com/

    How do you do that exactly – both on desktop and mobile? Thanks!

  • Hi there,

    can you share a link to your site where we can see the issue ?

  • anarchyforaardvarks

    I’ve added a link below, thanks.

  • OK.

    1. Add that CSS to your site in the Customizer > Additional CSS

    2. edit your page and select the GB Grid Block, in the block settings sidebar -> Advanced -> Additional CSS classes add: scrollable

    3. then select the Container Block that the Grid is inside of.
    3.1 set the Spacing > Margin Left & Margin Right to auto
    3.2 set the Sizing > Max Width to 1200px

  • anarchyforaardvarks

    Hi David, thanks. I’ve just done exactly as you said –
    1. I went to Appearance –> Customize –> added this Additional CSS:
    @media(max-width: 769px) {
    .gb-grid-wrapper.scrollable {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: mandatory;
    }
    .gb-grid-wrapper.scrollable .gb-grid-column {
    flex: 1 0 50%;
    scroll-snap-align: start;
    }
    }

    I copied and pasted it exactly like that on Line 1

    2. I put scrollable in Additional CSS for the GP Grid Block
    3. I set the spacing margin to auto and the sizing max width to 1200px for the GP Container Block

    It is still not scrolling. What am I doing wrong? Thanks.

  • I am not seeing any Customizer CSS being loaded on the page.
    Can you:

    a) make sure the changes in the Customizer were published ( not saved as draft )
    b) clear any caches on the site

    Let me know

  • anarchyforaardvarks

    Yes, I have done this three times. screenshot

  • anarchyforaardvarks

    The problem is that when I click out of that browser and go back to it, the CSS is empty once again. Could this be an issue with my customizer?

  • Can you check with your host if there is any caching on your server? OR if they can check for errors ?

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