user2954587 user2954587 - 8 months ago 37
CSS Question

Bootstrap 3 vertically align text for btn-group

How can I vertically align a label for a custom button group with a float?

<div class="col-md-12">
<div class="btn-group pull-right" role="group" aria-label="Sort By">
<button class="btn btn-default btn-sm">Friends</button>
<button class="btn btn-default btn-sm">Distance</button>
<div class="pull-right">
<div>Sort By:</div>

I tried
vertical-align: middle
with no luck



You can accomplish this with line-height.

.btn-group + .pull-right div {