I have the following HTML/CSS setup (jsFiddle):
.flex-container {
display:flex;
flex-direction:column;
}
.one, .two, .three {
flex: 0 0 auto;
}
.one {
order:0;
}
.two {
order:1;
}
.three {
order:2;
}
<div class="flex-container">
<div class="three">
<div class="one">One</div>
<div>Three</div>
</div>
<div class="two">Two</div>
</div>
As you can see, my aim is to order div .one at the top. The problem is that this div is inside a flex div with a different order.
What I've tried so far
position:absoluteorfixedon.one. While that works, I need all the divs to be blocks.- I have move the
.onediv to the parent div using javascript, but the aim is to do this without JS.
Any viable solution to this?