flex 2 columns per row

Solutions on MaxInterview for flex 2 columns per row by the best coders in the world

showing results for - "flex 2 columns per row"
Amelie
11 Jan 2021
1.item {
2  width: 100%
3}
4
5.container {
6  display: flex;
7  flex-wrap: wrap;
8}
9
10.container > div {
11  flex: 50%; /* or - flex: 0 50% - or - flex-basis: 50% - */
12  /*demo*/
13  box-shadow: 0 0 0 1px black;
14  margin-bottom: 10px;
15}
16/////////////html
17<div class="container">
18  <div class="item">1</div>
19  <div class="item">2</div>
20  <div class="item">3</div>
21  <div class="item">4</div>
22</div>