2 ms·
In short: don't use "float: left/right" for anything besides real floating images. In this case a "display: flex" on the <a> element would be a much better sol
by silvestrov 2y ago
In short: don't use "float: left/right" for anything besides real floating images.
In this case a "display: flex" on the <a> element would be a much better solution.
- londons_explore 2y agoI wonder how long ago this CSS was written... That particular UI element of google search has been around decades, so might predate css flex...
- ipaddr 2y ago2009 but css flex didn't become popular until 2014+.
- mananaysiempre 2y agoIn 2009, one still needed to give IE6 serious thought (even if, depending on the use case, the conclusion could already be “nope”). At the time, I had someone telling me that we shouldn’t waste our time on supporting mobile. And flexbox was more a curiosity you studied with a hope of using someday than a serious option. And clearing your floats was part of the absolute basics. Of course, we still forgot to now and then.