Check out example codes for "how to make a text in center with background color in css". It will help you in understanding the concepts better.

Code Example 1

<div style="text-align: center;background-color: rgb(150, 161, 255); display:table; margin:auto;  " id="clock">
            asd
    </div>

Learn ReactJs, React Native from akashmittal.com