3 ms·
Not true at all, especially in modern CSS. Position relative is only needed for using absolute positioning. That should be extremely rare. And overflow: hidden
by ImpressiveWebs 6y ago
Not true at all, especially in modern CSS. Position relative is only needed for using absolute positioning. That should be extremely rare.
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.
- willio58 6y agoWoah there. 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.
- ImpressiveWebs 6y agoAgain, z-index is so rarely used and if you needed overflow hidden for something other than floats, then you were doing your CSS wrong. I’m not saying that to be arrogant, I’ve written books on CSS and written articles for some of the biggest web dev sites online. It’s just true that many developers don’t understand CSS and often use the wrong tool for the right job, so to speak.