Check out example codes for "align in the middle of page html". It will help you in understanding the concepts better.

Code Example 1

.centered {
  position: fixed;
  top: 50%;
  left: 50%;
  /* bring your own prefixes */
  transform: translate(-50%, -50%);
}

Learn ReactJs, React Native from akashmittal.com