CSS Positioning - use the grid.

CSS is full of history with lots of complicated ways of trying to manage position and layout information. The best thing I can see is to ignore almost all of it and instead use single methodology which is the grid layout which have been supported by all the major modern browsers since 2017.

Key thing to keep in mind is you can use many grids in single page - with subsections having their own grids.