CSS debugging heuristic #1: 9 times out of 10 it's a `position: relative` or `overflow: hidden` you need.
And overflow: hidden is an old workaround for float-based layouts that should never be used in 2020 unless you’re debugging a legacy project. And even in that case, you should be using a proper clearfix instead.
Position relative can help with z-index issues.
Also, I’ve never dealt with float based layouts but I can tell you overflow hidden is useful outside of that context.
always use flexbox first before position relative