Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'float: right' evaluates as 'float: none'

Tags:

css

css-float

I have floats that are not behaving, and I have no idea why. This is what the Chrome dev tool says.

google chrome broken float computed view

As you can see, the only float set is float: right;, so it's not a specificity issue.

I've tried setting width, changing display, explicitly setting position: static/relative:, and a few other things I can't recall.

I am at a loss on how to fix it.

like image 399
amflare Avatar asked Aug 19 '16 22:08

amflare


1 Answers

The issue is that the parent was display:flex;. You can't float in a flex-box. Hope this helps someone in the future.

like image 90
amflare Avatar answered Nov 09 '22 09:11

amflare