Check out example codes for "text-align:center apply to parent div or child div". It will help you in understanding the concepts better.

Code Example 1

.parent {
    width: 100%;
    border: 1px solid blue;
    text-align: center;
}

.child {
    display: inline-block;  
    border: 1px solid red;
    margin: 2px;
}

Learn ReactJs, React Native from akashmittal.com