+ 2
Hello...if i make a div element in HTML & round the div to a circle with CSS, how do I keep the writing in the middle?
hereEis my code : https://code.sololearn.com/We46sc64W4vk/?ref=app
2 Antworten
+ 5
Add a <p> element around the text and inside the other element.
<element class="hi"><p>text</p></element>
and add this into your CSS file:
.hi p {
position: relative;
transform: translate(0%, -50%);
top: 50%;
text-align: center;
}
+ 1
thanks a lot.