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

Code Example 1

.parent-div {
 	display: flex;
    justify-content: center; 

Code Example 2

#container {
    width: 640px; /*can be in percentage also.*/
    height: auto;
    margin: 0 auto;
    padding: 10px;
    position: relative;

Learn ReactJs, React Native from