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

Code Example 1

.centered {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

Code Example 2

div.a {
  text-align: center;
}


    div.b {
  text-align: left;
}


    div.c {
  text-align: right;
}

div.c {
  text-align: 
    justify;
}

Code Example 3

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

Learn ReactJs, React Native from akashmittal.com