loading...

Discussion on: Explaining CSS float

Collapse
danspratling profile image
Dan Spratling

It's also worth mentioning that when you float both columns inside a container, you'll need to clear them in order to prevent overlapping the following content.

I haven't used float in years. Grid and Flexbox have almost entirely replaced it - especially when creating content rows/columns.

When would you recommend using Float over Grid or Flexbox?

Collapse
alohci profile image
Nicholas Stimpson

How do you use Grid or Flexbox to make a block that text will wrap around as depicted in this article?

Collapse
danspratling profile image
Dan Spratling

You can't, but inline-block does I believe. This is often the default style for wysiwyg elements which you often want to undo.

There are use cases for float, but they’re rare. Doesn’t mean it’s not useful to know.