Overflow:hidden only horizontal

Hello,

I’m struggling with a complex background.
I’ve got blurred shapes on my background. These shapes go outside the parent element.

Because of that, I need to set the overflow of the parent element to hidden to avoid horizontal scroll.
BUT… I can’t do it.
BECAUSE… my content-container need to be relative with a top margin so it goes outside the parent container.

What’s the solution here ?
I can’t set my div-block-6 overflow to hidden or my content-container is also cut.

Please not : the problem may not be visible with the preview mode. Here’s the production URL : https://active-replica-layout.webflow.io/careers/career


Here is my site Read-Only: LINK

@cyberdave can you help again on this one ? :slight_smile:

@tvog hi , try this set.

1 Like

Try adding this code to the “before tag” field on your page settings

document.querySelector('body').style.overflowX = 'hidden'

Side note that if you use this code, sticky elements on Safari might not stick anymore.
The better solution would probably be having a div that carries all of your outside sticking elements, make that div absolute and make sure that it has 0% set on all directions.

Then put that div on your section, make that section relative so that the div will be relative to that section and then set the div’s z-index to -1, or set the content you want to be above the background to have a z-index higher.

1 Like

Hello,
Thanks but it doesn’t work. My content is cropped at the bottom. :frowning:

if you problem is this

or try another way