+ 4
How can I put text in the middle of circle!?
8 Réponses
+ 7
There are tricks for that, if you want a fixed dimension circle that's easy, if you want a responsive adaptive circle you need to do this:
<input disabled value="text goes here">
input{
height: 15vmin;/*look viewports online*/
width: 15vmin;
text-align: center;
background: blue; /*so you can see it*/
color: white;
border-radius:50%;
border: 0;
}
And there you have it 😌
P.S. sorry if my English is not really good, that's not my native language
+ 1
make a div off square give it border radius of 50 or 100 px and set text-align to center
0
But it only a single line of text which may not be complete can be written on it and only placed at the center only...... Pls help me out I want to write text in all angles of the circle.
0
Thanks you guys are great 👍
- 1
using text align:center
- 2
yes, you can by using the HTML code
- 2
text-align:centre
- 2
use text-align:center and padding