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.

Off-canvas menu adding horizontal scroll on mobile

  • Hi guys,

    I’m using this custom CSS from David on an another thread to customise the widths of my off-canvas menu:

    /* desktop width */
    :root {
        --slideout-width: 35vw;
    }
    /* small device width */
    @media(max-width: 768px) {
        :root {
            --slideout-width: 100vw;
        }
    }
    
    #generate-slideout-menu.main-navigation.offside {
        width: var(--slideout-width);
    }
    
    #generate-slideout-menu.main-navigation.offside--left {
        left: calc(-1 * var(--slideout-width));
    }
    
    #generate-slideout-menu.main-navigation.offside--left.is-open {
        transform: translate3d(var(--slideout-width), 0, 0);
    }

    But, I’m now finding that it’s adding a horizontal scroll on mobile. It seems to be loading at 30px wider than the device screen size, eg. screen size set to 442px width and div.slideout-overlay loads at 472px width:

    Thanks,
    Greg

  • Hi there,

    the hero element you have has a Headline showing the date, its Sizing -> width is set to 100% which is creating overflow. Try removing the 100% width to fix that.

  • Ahh, sorry David, I should have spotted that!
    That’s fixed it, thanks for your quick reply.

  • You’re welcome

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