Is CSS float deprecated?

Is CSS float deprecated? • WPShout

As a perennial CSS newbie (who kind of had skills a decade ago) I appreciated this short article from Robin Rendle about when (translation: how little) you should use the float: left that was so common when I last really did CSS.

To summarize, you can (and should) keep using float for what it is originally designed for: embedding small things like images inside of text which flows naturally around them. But all the other layout used people put them to for years? Skip it and that annoying clearfix stuff we all had to do.

The most interesting thing from the article—which Robin also seemed surprised by—is that haven’t actually need to do that clearfix stuff for a while, all because of a little property on display called flow-root. To learn just how that works, you’ll have to click through ?

Keep reading the article at WPShout. The article was originally written by David Hayes on 2021-02-17 11:50:18.

The article was hand-picked and curated for you by the Editorial Team of WP Archives.

Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the product, We may receive an affiliate commission.

Leave a Comment

Your email address will not be published. Required fields are marked *

Show Your ❤️ Love! Like Us
Scroll to Top