Website has white space to the right (probably due to animation). How to remove it?


You can only see this on a mobile phone. But there is a white space to the right (you have to swipe to the right) when you visit my website on the phone.

I think it has to do with my animation when you open navbar. Because it slides from right to the left. From outside the website to on the website.

How to make this white space go away?

Hi Mourik!

Seems like this div is causing issues because of its width. Try adjusting or deleting it.

Hi RoryVB, it kinda worked. When you scroll down and swipe to the right. You still get to see some white space. But after like 3 sec, you cant swipe to the right anymore and the white space is gone. So there is still something that causes it.

But it’s much better than now, Thanks!

To prevent overall horizontal scroll you can wrap all of your sections in a div and give it overflow: hidden. In this case my class main-wrapper has overflow: hidden

1 Like

Aah nice, good to know. Will do!

1 Like