Reputation: 2119
Is there a way to apply Pill badges for Bootstrap v3.3.7?
Similar to what we have on Bootstrap 4 with the class .badge-pill
.
https://v4-alpha.getbootstrap.com/components/badge/
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div>
<span class="label label-primary">close x </span>
</div>
Upvotes: 1
Views: 4795
Reputation: 542
you can make a new css class :
.label-primary{
border-radius: 1em;
padding: 1em;
}
Upvotes: 0
Reputation: 106008
You can recreate a similar class increasing border-radius if such a class is not avalaible in bootstrap
.label.badge-pill {
border-radius:1em;
margin:0 0.25em;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div>
<span class="label label-default badge-pill">default </span>
<span class="label label-primary badge-pill">primary </span>
<span class="label label-success badge-pill">success</span>
<span class="label label-info badge-pill">info </span>
<span class="label label-warning badge-pill">warning </span>
<span class="label label-danger badge-pill">danger </span>
</div>
Upvotes: 5