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: https://jsfiddle.net/n0ztmLg9/
Or code shown below
box-shadow: 25px 10px 0px 0px blue;
<div class="center ">
Hi, i don’t know where you want to center the text,
but with that code you’re centering on the middle of the element, because the shadow it’s part of the element.
Try this way:
// Your styles....
and delete the .text styles.
ummm the text vanished with your code. correction: i want to center the text in the circle
Cool it works. I thought its a impossible task when i was trying to find a solution on google. Can you please explain why you chose those codes.
Thanks a mil.
He used Flexbox properties.
It is a part of CSS, super helpful for position stuffs.
Learn about flexbox, as you get time, it will make your life little easier