DEV Community

Discussion on: Deep dive into z-index

Collapse
 
afif profile image
Temani Afif

No z-index means z-index: 0 --> no, it means z-index:auto and not 0. There is a difference because 0 create a stacking context while auto doesn't.

If the z-index of element doesn't have a positioned element, z-index does NOT have an effect --> flex item and grid item don't need to be positioned to use z-index

Collapse
 
takuyakikuchi profile image
TK

Thanks a lot for your comment!!
Updated the content!