Reputation: 1944
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.
Upvotes: 0
Views: 676
Reputation: 1150
Here's what we did in one of our apps, hope it's helpful.
.circle {
display: inline-block;
width: 20px;
height: 20px;
border-radius: 50%;
color: white;
background-color: red;
text-align: center;
font-weight: bold;
vertical-align: middle;
line-height: 20px;
}
<div class="circle">+</div>
Here's the Codepen: http://codepen.io/SaraChicaD/pen/zKYaoO
Upvotes: 0
Reputation: 955
Try this one
HTML
<label>+</label>
CSS
label{
padding: 4px 9px;
background: #dddddd;
width: 1px;
border-radius: 45%;
}
Just adjust the padding depending to you need
Upvotes: 0