Check out example codes for "how to center a div element". It will help you in understanding the concepts better.

Code Example 1

/*ADD MARGIN auto to left and right*/
.box1{
    width:80%;
    margin:0 auto;
}

Learn ReactJs, React Native from akashmittal.com