user2954587 user2954587 - 1 year ago 122
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


Answer Source

You can accomplish this with line-height.

.btn-group + .pull-right div {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download