D
D
Don Puh2021-04-20 22:53:03
Flexbox
Don Puh, 2021-04-20 22:53:03

How to place blocks using Flexbox without additional wrappers?

How can I use flex to place blocks like in the picture without additional wrappers?
Original "Option 1", need "Option 2".

<div class="container">

      <aside class="left">
         left
      </aside>

      <main class="center">
         center
      </main>

      <aside class="right">
         right
      </aside>

</div>


607f31ad8ba86345965604.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2021-04-20
@Casufi

flex-direction: column
flex-wrap: wrap
on children adjust order and base
https://css-tricks.com/snippets/css/a-guide-to-flexbox/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question