How can i center my text in the circle in the code below?
I was reading a lesson on creating a crescent moon but later thought to add text in the center of the circle. But for some reason i cant.
Link to the code: Edit fiddle - JSFiddle - Code Playground
Or code shown below
<style>
.center {
position: absolute;
margin: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100px;
height: 100px;
background-color: red;
border-radius: 50%;
box-shadow: 25px 10px 0px 0px blue;
}
.text {
position: absolute;
text-align: center;
width: 100%;
top: 50%;
}
</style>
<div class="center ">
<div class="text">dog</div>
</div>