how to make a text in center with background color in css

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

Also in CSS: