Search code examples
cssscrollmenuoverflowfixed

Links in a fixed element don't work when overflow hidden


Here is my simplified problem : https://jsfiddle.net/44sjaq1q/2

I use a fixed bottom menu hidden with z-index:-1 position:fixed, and revealed with the scroll. But, the links in the menu don't work.

In my page, I use elements creating a x-scrolling, but i use a overflow-x: hidden, to unabled the horizontal movement.

It seems the two rules can't work in the same time.

Thanks for your help.


Solution

  • It's because of z-index:-1. Negative z-index send the elements to back, hence they are not accessible.

    Remove z-index: -1 and the links will be accessible. Updated fiddle