#main div {
width: 70px;
height: 70px;
}
*{
// if b0x-sizing is uncommented then the div's overflow and donot stay in the box
//box-sizing: border-box;
margin: 0;
padding: 0;
}
#main {
width: 140px;
height: 300px;
border: 1px solid #000000;
display: flex;
flex-flow: row wrap;
align-content: space-around;
}
please show a live example of what you are doing (perhaps with codepen)