Byron Mh Byron Mh - 1 year ago 88
CSS Question

Locate div's in a specific order

if I have:


is there a way for the div's to appear this way when the page loads?


it doesnt matter the method

Answer Source

You can use display:flex and order to rearrange how the divs look on the dom

check this snippet

.container {
  display: flex;
  flex-direction: column;
div:nth-child(1) {
  order: 2;
div:nth-child(2) {
  order: 3;
div:nth-child(3) {
  order: 1;
<div class="container">


Hope it helps

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download