DEV Community

loading...

Do you even use CSS floats these days šŸ¤”

nikitahl profile image Nikita Hlopov 惻1 min read

I was wondering if anyone is still using CSS float property today?
If so what's the reason or possible application for that?

Discussion

pic
Editor guide
Collapse
mattmcadams profile image
Matthew McAdams

Almost always the answer for me is no. However, there is a rare time where a client really wants that text to wrap around an image and a float is probably the best way to go.

Iā€™d never use them for anything else now that we have flexbox and grid

Collapse
pfacklam profile image
Paul Facklam

Nope. It's been a while since I used it the last time. But I am sure that there is still an use case for it.

Collapse
sharakpl profile image
Sharak

I think it's used mostly in text editors (WYSIWYG) to arrange imaages inside block of text. In other parts flex and grid is the way to go