I have a
<div class="parent">
<div class="child" style="float:right"> Ignore parent? </div>
<div> another child </div>
</div>
The parent has
.parent {
display: flex;
}
For my first child, I want to simply float the item to the right.
And my other divs to follow the flex rule set by the parent.
Is this something possible?
If not, how do I do a float: right
under flex?
float
is often misused for its very purpose. But indeed,float
withflexbox
/order
don't work together, and one would have to use some HTML reordering, and in the most common use cases, media queries forfloat
orflex
+ aleteredorder
depending of the screen width (for example)