Just learned CSS has 5 "Layout modes": 1
Just learned CSS has 5 "Layout modes":
1. Flexbox
2. Positioned (eg. position: absolute)
3. Grid
4. Table
5. Flow
Some CSS properties work differently in each layout mode, so it pays to know the differences.
Excellent post by @JoshWComeau: https://www.joshwcomeau.com/css/understanding-layout-algorithms/
@JoshWComeau One notable example: z-index isn't supported in flow mode. That's why z-index does nothing when applied to an element that's displayed in flow mode (the default mode).
So, you have to specify position, or use flexbox to get z-index to work - only some layout modes support it.