'position: absolute'
means that the element goes where top/left/bottom/right properties tell it to go.
This is relative to its "containing block" which is the next ancestor whose positioning is 'absolute' or 'relative' (or others?)
They don't move with scroll.
(if you're formatting for pages, they appear on every page.)
I would have expected it to be like ‘top: 0px’ but nope, it means “it matters where I put this element among the other contents”
You can set the z-index property to:
A negative integer: be behind normal stuff
Positive: be in front of normal stuff
(In order of course)
- blocks
- floats
- inline stuff
Oh but whatever “forms the stacking context” by declaring a z-index other than “auto” - its backgrounds and borders go first (farthest back).
Both float and absolute/fixed position change the display value, too. A bunch of inline and within-table values just become “Block”. Because a floating or absolute “table-footer-group” doesn’t make sense
Don’t mess with these if you’re styling HTML. People from the Unicode and HTML standards have worked hard to get them right. CSS collaborates.