0

I'm trying to accomplish this with flexbox =>

desktop :

|         |   | block 1 |
| block 2 |
|         |   | block 3 |

mobile :

block 1
block 2
block 3

I came to this

.cont {
  display: flex;
  flex-direction: column;
  flew-wrap: wrap-reverse;
}

.myblocks.block2 {
  order: -1;
}

@media screen and (max-width: 640px) {
  .cont {
    display: block;
  }
}

But this doesn't work until I set a fixed height to .cont and a flex-basis to .block1


Questions :

  • is there a way with flexbox to accomplish this, without fixed height ?
  • is flexbox the right tool for this ?

NB: I'm using Bulma

Cyril CHAPON
  • 3,556
  • 4
  • 22
  • 40

0 Answers0