Overflow no longer hidding elements on desktop

Hi everyone,
I hope you’re well!

Little new bug here.
I run a little javascript when my website loads that hide overflowing elements for design purposes.

var container = document.getElementById(‘mypage’);
container.style.overflow = ‘hidden’;

It still works perfectly on mobile but it no longer works on desktop for some reasons, leading the website to appear very unzoomed when it loads and making design elements very… visible.

It wasn’t like this some weeks ago. The website is mostly meant to be used on mobile so that’s ok but still… I worked hard to make it responsive and everything so it’s a bit frustrating! Don’t know what to do about it.

Anyone has an idea?

Thanks so much!!

1 Like

I would suggest not using javascript if it can be done natively in Bubble. Bubble also suggests not to use custom code as Bubble may make changes to their codebase that could cause problems for custom code used in an app.

Overall, there should be no reason you can not get the design you want using native Bubble responsive design features.

I get your point but unfortunately this is not possible natively in Bubble :slight_smile:

1 Like

Could you demonstrate or expand on what it is that you are doing that is not possible in Bubble…is it that you are making elements that are overflowing their containers not visible at all or are you making them so instead of overflowing, their containers are expanding to fit the content?

2 Likes

I like the idea/concept, design, and functionality of this app. I’d love to see something similar here in the US. Great job!

1 Like

Sorry for the delay in my answer!

This is purely aesthetic but basically you can’t do trapezoid shapes on Bubble.

So what I do is that I rotate rectangles, give them a width that is much bigger than their container’s width, and use a simple javascript/css to hide overflow, hence removing the part of the rectangles that stick out. So for instance if you load it on mobile you will see it at the correct size, and if you try to zoom out the rectangles seem to be trapezoids going from one side of the screen to another.

It was also working as intended on desktop but since recently like two or three weeks the overflow is no longer hidden.

So you have weird rectangles and a very zoomed out view when you load the page.

Again the website is mobile first but I was just wondering if somebody knew how to make it work again :slight_smile: and then why does it still work on mobile and not desktop haha

I’ll keep on grinding! If you know how to do this natively I’m all ears btw!

1 Like


I use Microsoft Edge by default (yes I’m that guy…) where the bug happens but just tested on Chrome and it seems fine actually :man_shrugging:

Thanks man! Appreciated

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.