Ordering The div’s

We can arrange the order the div’s as columns and then we can give them order property, which orders within the container of the child div’s

<div class="box">
    <div><a href="#">One</a></div>
    <div><a href="#">Two</a></div>
    <div><a href="#">Three</a></div>
</div>

.box {
  display: flex;
  flex-direction: column;
}
.box :nth-child(1) { order: 2; }
.box :nth-child(2) { order: 3; }
.box :nth-child(3) { order: 1; }

Leave a comment

Your email address will not be published. Required fields are marked *