1

I simply want to put a button that is positioned as position absolute in front of a div that is positioned as position fixed. This way I want to prevent the button from being disabled when an angular dialog is shown and the shadow overlay of the dialog 'hides' the button. The problem is that when using position: absolute setting the z-index has no effect. When using position: relative at least a negative z-index prevents the button from being clicked at all, but it's still visible (don't know if this is expected behavior, I expected it to disappear). But no matter how high the z-index value is, it's never on top. The dialog overlay only has a z-index of 1000 ;

Marcel Lorenz
  • 295
  • 2
  • 13
  • Pleas add your code to this question. Without it, we're just guessing what's happening. Please read [how to create a minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). Also, you should read up on [Stacking Context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context) – disinfor Mar 15 '22 at 17:13
  • https://stackoverflow.com/questions/9191803/why-does-z-index-not-work – disinfor Mar 15 '22 at 17:14
  • Thanks, but it does not help. I already said, that I have position relative/absolute and fixed in use. I know it does not work for static – Marcel Lorenz Mar 15 '22 at 17:29
  • Without seeing your code, we can't help. – disinfor Mar 15 '22 at 17:54

0 Answers0