T
29

Friend told me to stop using floats for CSS layouts back in 2017

I was building this site for a local bakery in Boulder and had everything positioned with floats. Buddy from a meetup said I was wasting time and should learn flexbox. I shrugged it off because floats worked fine. Two months later I had to rebuild their menu page from scratch because nothing stacked right on mobile. That guy was totally right. Has anyone else had a stubborn moment where you ignored good CSS advice?
2 comments

Log in to join the discussion

Log In
2 Comments
burns.brooke
burns.brooke4d agoMost Upvoted
Gotta push back a tiny bit here - flexbox actually came out around 2009, it just took forever for browsers to fully support it. So your buddy Mark's 2018 project was way past the point where floats were the only option haha. But yeah, I feel that pain of having to redo something basic that you thought was fine.
8
riley58
riley584d ago
My buddy Mark spent like three weeks building this whole portfolio site using floats back in 2018. He was super proud of it, had all these galleries and contact forms perfectly aligned. Then his client pulled it up on an iPad and the whole thing just fell apart sideways. He spent another weekend crying over it and rewriting everything in flexbox. He still brings it up whenever someone mentions floats, gets all defensive about how he learned his lesson. Made me feel better about my own bakery site disaster though, knowing I wasn't the only one.
5