Check out example codes for "flexbox align center vertically". It will help you in understanding the concepts better.

Code Example 1

.Aligner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.Aligner-item {
  max-width: 50%;
}

.Aligner-item--top {
  align-self: flex-start;
}

.Aligner-item--bottom {
  align-self: flex-end;
}

Learn ReactJs, React Native from akashmittal.com