Skip to content

react spring parallax with navbar on top is creating 2 scrollbars #1918

Answered by kindoflew
Mootbing asked this question in Support
Discussion options

You must be logged in to vote

I don't think it has to do with the Router necessarily. Parallax will take up the full height/width of the screen by default, so the typical use is to treat the component as if it was the actual page being scrolled. Since the nav is outside of it, that creates scrollable space in the top-level element, so you'd see the window scrollbar and the Parallax scrollbar.

The solution is probably something that would involve positioning the nav so it isn't in the normal document flow (with something like position: absolute). This way, Parallax could still take up the entire viewport without causing another scrollbar to appear.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Mootbing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants