Check out example codes for "position absolute center". It will help you in understanding the concepts better.

Code Example 1

position: absolute;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
text-align: center;

Code Example 2

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

Code Example 3

position: absolute;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;

Learn ReactJs, React Native from akashmittal.com