How to Manage z-indexes
If you've ever needed to stack things in CSS, it's very likely that you've seen code that looks like:
.a {
z-index: 9001;
}
Here you can see the z-index is set to an obscenely large integer value.
This strategy for managing stacking order is largely based on hoping that it will work, and luck.
Unfortunately, luck isn't a strategy, and items stacked in this way often result in a cascade of changes where developers progressively increase z-indexes until things seem to work.
.b {
- z-index: 8000;
+ z-index: 9002;
}
.c {
- z-index: 8500;
+ z-index: 9003;
}
