Adrian.I Adrian.I - 1 year ago 146
CSS Question

Vertical align a label inside btn-group using Bootstrap

I have 2

inline elements
inside a horizontal form and I can't vertical align the labels . Is there a clean way to do it without using hacks like display:table ?

Here is the code i tried so far: bootply

Answer Source

probably not the best way but it is easy and it works.

add line-height css to the label and match it with the height of the button

new css:

.btn-group label{
   line-height: 35px;

since the .btn-group is 35px high, you make line height 35px as well.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download