Check out example codes for "place many images in a div beautifully". It will help you in understanding the concepts better.

Code Example 1

div {
  display: flex;  
  flex-wrap: wrap;
}

Learn ReactJs, React Native from akashmittal.com