I can turn a div into a circle like this:
.circle {
background-color: rgba(0, 0139, 0139, 0.5);
height: 200px;
width: 200px;
-moz-border-radius:50%;
-we
This fiddle demonstrates a solution using only css. It works flawlessly (I think) in modern browsers (IE9+, which is needed for border-radius anyway) with single lines of text. Caveats are:
border on the span set to the "padding" size. This should also not normally be a big issue, since it is unlikely you would want borders inside the circle.max-width), then css for margin-top and top properties must be set according to the number of text lines. This could be an issue depending on application. On the stacked version, IE9 needed overflow: auto set to get it to size correctly.white-space: nowrap is not set and a circle begins wrapping its single line of text, then some ovular distortion of the circle occurs.Each web designer would have to determine if the limitations of this solution can be accounted for or not. If not, then the javascript solution posted here by rgthree should work well. But if only a single line (or some set number of lines, like in my cyan circle) are expected, then this css solution should work well.