Jump to content
Search Community

Horizontal scroll issue - 'overflow-x: hidden' ends up hiding vertical scroll as well

rvp test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

Hey guys,

 

I came across the following issue: the provided codepen contains a simple ScrollTrigger layout. I believe the gsap-generated `pin-spacer` div causes a horizontal scrollbar to appear on the page. So to hide that scrollbar I've tried adding `overflow-x: hidden` to the body element but for some reason that seems to also hide the vertical scrollbar and therefore disables page scrolling altogether. To reproduce, just enable the `// overflow-x: hidden;` line and observe how both scrollbars will be hidden.

 

So am I doing something wrong here or is this a GSAP bug? My main goal is to remove the horizontal bar without breaking vertical scrolling and I can't seem to achieve it so far. Any input would be appreciated!

 

 

 

 

See the Pen wvroROJ by RVP22 (@RVP22) on CodePen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...