Check out example codes for "center div vertically html css". It will help you in understanding the concepts better.

Code Example 1

/* No Flexbox */
.parent {
  position: relative;
}
.child {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* With Flexbox */

.parent {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

Code Example 2

align verticaly

Learn ReactJs, React Native from akashmittal.com