transform class is increasing the z-index of a div #2100
-
When transform property is set for a div, it is increasing the Manually setting the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Could you give a small example of the HTML and CSS that reproduce this behavior? |
Beta Was this translation helpful? Give feedback.
-
sorry, my bad. It is actually the
The above element being set as fixed, gets displayed on top of all the other elements when an event is triggered. This works perfectly with no issues. But when I set the
Sample screenshots by keeping and removing the For reference, the complete JS component with the styling applied can be found here - https://github.com/neel1996/gitconvex-ui/blob/82d84fc19561c47769619ea68654da9a5e905706/src/Components/DashBoard/Repository/RepoComponents/RepoDetails/FileExplorerComponent.js |
Beta Was this translation helpful? Give feedback.
-
This happens even if you aren't using Tailwind, just how CSS works: You need to work around it by explicitly assigning a position other than static and a z-index to the things that are layering unexpectedly. |
Beta Was this translation helpful? Give feedback.
This happens even if you aren't using Tailwind, just how CSS works:
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
You need to work around it by explicitly assigning a position other than static and a z-index to the things that are layering unexpectedly.