restrict flex items in a row

Solutions on MaxInterview for restrict flex items in a row by the best coders in the world

showing results for - "restrict flex items in a row"
Ethann
03 Oct 2016
1.parent {
2    display: flex;
3    flex-wrap: wrap;
4  }
5
6  .child {
7    /* percent per item in row. 
8    33% = limit to 3 per row. */
9    flex: 1 0 33%; 
10    margin: 5px;
11    height: 100px;
12    background-color: blue;
13  }