Check out example codes for "keeping elements of container in center". It will help you in understanding the concepts better.

Code Example 1

.container {
margin : 0 auto;
}

Learn ReactJs, React Native from akashmittal.com