weird white gap on the bottom while scrolling down mobile
Hi! So I was wrapping up this screen when I started testing it on mobile. As you can see, when sliding down, this weird white gap appears as long as I hold on to the slide. When letting it go, it goes back to normal. This is how I have implemented the background:
13 Replies
is this a scrollview? or have you tried overflow y hidden
maybe try setting the background on html element
What's a scrollview? It's all React web
I'll try that
Didn't work 🥲
You could try to add overscroll-behavior-y: contain on the body
yeah nvm i read it as react native by mistake
have you given it a fixed height
Thanks for the suggestion, unfortunately it doesn't seem to work
Yeah I've tried that too, for some reason it didn't change anything
Oh my god, finally
Ok, so this is what fixed it for me
Half a day on this, my god
i don't believe you need all the overflow properties and such, you can simply do something like this, https://codepen.io/deerCabin/pen/abPKqva
please, dont do that
set the body to have an height of 100%, and the html an height of 100dvh
that should do it
hm i've heard of a lot of different versions of that, i guess it's whatever method floats your boat really and what fits the project.
I'll test it tomorrow! If that works, perfect
The only trouble I'm having is on mobile though
alrighty, good stuff
yeah that should work on mobile too
although i set it to have a min-width of 22rem so that might cause a scrollbar on mobile haha, don't need to add that in your project though, it was just placeholder code, your content will decide the width.
Looks similar to Andy Bell’s CSS reset, I like your solution 🙂👍
yeah i've checked his work out a few times, thank you but can probably be improved haha