CSS positioning was always a nightmare, that peak has been summited today thanks to freeCodeCamp's CSS Grid Tutorial
If you are on the same boat as I am where you've done very minimal UI design code, Do yourself a favour and learn Grid, it takes 1 hour tops and your positioning woes will magically disappear.
CSS Grid + Flexbox = positioning superpowers!
View this code in action on Glitch
Here is centering example made with CSS flex Here is a three divs stacked on top of reach other \ ゜o゜)ノ