TIL that in CSS, if you want to position an item relative to its parent, you tell the parent to position relative and the child item to position absolute. 🤷 Noob life. (Mostly tweeting so I have a better chance of remembering next time I need it.)

Oct 30, 2022 · 2:58 PM UTC

1
1
9
Replying to @justvanrossum
The CSS box model is very simple and intuitive but you need to read it first 🤪BTW z-index also doesn’t work if you don’t have position set on the element.
1
1
At my age, these things take a little longer to digest and internalize...