3 ms·
I still use them plenty, but more for specific situations rather than major layout decisions. Both have their warts however. Float can have undesirable behavi
by SquareWheel 7y ago
I still use them plenty, but more for specific situations rather than major layout decisions. Both have their warts however.
Float can have undesirable behaviour regarding document flow and clearing afterwards. I try to use it just for floating things inside of text.
Position is just a bit illogical, really. Especially when playing with absolute. It puts you at the mercy of any parent element that just happens to be position:relative. I try to stay in the document flow whenever possible.
I like flexbox a lot. My biggest complaint is simply that it has a ton of rules and have to frequently look them up. It's a lot nicer to work in for 1D interfaces though. Especially in the age of responsive design.
I haven't had a chance to really dive into grid yet, but from what I've read it looks really useful for 2D layouts. It means not having to rely on the various column-based CSS frameworks for more complex sites. This will probably be my go-to in the future for main site layouts.