user3658423 user3658423 - 3 months ago 20
HTML Question

html circle around a text

Is there a CSS way to create a circle around a text. My text is just a "+" sign and im trying to create a circle around it. I tried the bootstrap badge but thats oval.

Any ideas?

Thanks.

e p e p
Answer

Here is the fiddle

<span>+</span>

span {
    display: block;
    height: 30px;
    width: 30px;
    line-height: 30px;

    -moz-border-radius: 30px;
    border-radius: 30px;

    background-color: grey;
    color: white;
    text-align: center;
    font-size: 2em;
}