5 ms·
Am i the only one who still uses good old floats and position? Supported everywhere, keeps markup to the bare minimum and doesn't smell like 1992 <table> based
by tomcooks 7y ago
Am i the only one who still uses good old floats and position?
Supported everywhere, keeps markup to the bare minimum and doesn't smell like 1992 <table> based layouts.
- SquareWheel 7y agoI 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.
- _the_inflator 7y agoNope, you are doing good. I did floats and positioning for over 10 years and still like it. In my opinion however Flexbox and Grid have a decent advantage when it comes to responsive/fluid layouts. Grid and Flexbox scale by design while floats and position feel static.
- kibwen 7y ago> and doesn't smell like 1992 <table> based layouts. Word of advice: don't even think about viewing the source on this very page. :P