As you are adding flex item
property of 1
, so by default it takes full width
horizontally for each items
according to the width of container
and that's why flex:wrap
doesn't works, instead add as below,
The flex property specifies the length of the item, relative to the
rest of the flexible items inside the same container.
#calendar {
display: flex;
flex-flow: row wrap;
}
#calendar div {
width:14%;
text-align: center;
}
<div id="calendar">
<div>
1
</div>
<div>
2
</div>
<div>
3
</div>
<div>
4
</div>
<div>
5
</div>
<div>
6
</div>
<div>
7
</div>
<div>
8
</div>
<div>
9
</div>
<div>
10
</div>
<div>
11
</div>
<div>
12
</div>
<div>
13
</div>
<div>
14
</div>
</div>