Is there a way to make a circle box with a circle content? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Is there a way to make a circle box with a circle content?

I'm wondering is there a simple way to make a circle filled with rounded text within the circle? I tried radius, but the text overflows the corners. It just behaves like there are no rounded corners. I'd like to do it with css and html only if it's possible. If not, I'm open to other ideas :)

21st Apr 2017, 8:12 PM
Phoe
Phoe - avatar
6 Answers
+ 4
I tried it at the beginning. Padding won't do anything good in this case, because I have a perfect circle instead of a square with rounded corners. Ps How can I answer directly on someone's answer and not my own here? Is there a button or something? I can't see it ^ ^
22nd Apr 2017, 2:18 AM
Phoe
Phoe - avatar
+ 4
This looks promising -- it appears to divide the text into spokes, then distributes them with rotations around a path: https://css-tricks.com/set-text-on-a-circle/ A CSS path library: https://tympanus.net/Development/Arctext/ An interactive tool: http://csswarp.eleqtriq.com
19th May 2017, 12:56 AM
Kirk Schafer
Kirk Schafer - avatar
+ 2
I'm imagining "shape-outside" but inverted. Sadly, there is not currently a "shape-inside" CSS rule. Maybe upload an SVG of a rectangle with a circular hole and then use shape-outside: url(); to use the custom shape. Also found an example using shape-outside on 2 <div>s to flank either side of the text: https://www.html5rocks.com/en/tutorials/shapes/getting-started/ If I ever get that idea to work, I'll post code.
10th May 2017, 6:39 AM
Nathan Wood
Nathan Wood - avatar
0
try adding padding
22nd Apr 2017, 1:55 AM
Giannis Tsirovasilis
Giannis Tsirovasilis - avatar
- 1
p
22nd Apr 2017, 2:32 AM
mohamed helal
mohamed helal - avatar
- 1
what answer ??
22nd Apr 2017, 12:27 PM
mohamed helal
mohamed helal - avatar