Check out example codes for "css align center vertical and horizontal". It will help you in understanding the concepts better.

Code Example 1

.parent-class {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

Code Example 2

div.center{display:block;margin:auto;width:50%;}
p.center{text-align:center;}

Learn ReactJs, React Native from akashmittal.com