With Bootstrap 3, what might be a good way of getting a bordered label with close icon? An example of the sort of thing from Stack Overflow:
@user3364825 - Thank you for posting your solution! It is a simple and elegant solution for displaying search filter tags.
I modified the CSS slightly, just so the tags are a little more responsive. The modified CSS addresses two issues:
Here is the modified CSS:
.tag {
font-size: 12px;
padding: 0.3em 0.4em 0.3em;
margin: 2px 1px !important;
display: inline-block;
max-width: 100%;
}
.tag > span {
display: inline-block;
max-width: 94%;
white-space: nowrap;
overflow: hidden;
-ms-text-overflow: ellipsis;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
.tag a {
display: inline-block;
color: #bbb;
cursor: pointer;
opacity: 0.6;
margin: 0 0 0 0.3em;
}
.tag a:hover {
opacity: 1.0;
}
.tag a .glyphicon-white {
color: #fff;
margin-bottom: 2px;
}
.tag .remove {
vertical-align: bottom;
top: 0;
}