Check out example codes for "how to move block elements in css". It will help you in understanding the concepts better.

Code Example 1

.parent {
  position: relative;
}
.child {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

Code Example 2

.clearfix {
  overflow: auto;
}

Code Example 3

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

Learn ReactJs, React Native from akashmittal.com