Check out example codes for "make web page float to center of page". It will help you in understanding the concepts better.

Code Example 1

.center { 
    text-align-last: center; 
    border: 2px solid black; 
}

Learn ReactJs, React Native from akashmittal.com