Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to vertically align long label in Bootstrap 3

I have got a long label next to my input and it is not vertically aligned.

Is there some option to solve it like it was in Bootstrap 2, please?

 <form class="form-horizontal" role="form">
  <div class="form-group">
    <label for="input1" class="col-lg-2 control-label">Labdas kjas kljas dlkjasd lksjd     el1</label>
    <div class="col-lg-10">
      <input type="text" class="form-control" id="input1" placeholder="Input1">
    </div>
  </div>
  <div class="form-group">
    <label for="input2" class="col-lg-2 control-label">Label2</label>
    <div class="col-lg-10">
      <input type="password" class="form-control" id="input2" placeholder="Input2">
    </div>
  </div>
</form>
like image 662
Lunack Avatar asked Nov 24 '22 02:11

Lunack


1 Answers

not very cleanly... you would need to add an override class to the long label, such as multiline and then add a definition for that class like so

.control-label.multiline
{
    padding-top:0;
}
like image 120
Ted Avatar answered Nov 26 '22 11:11

Ted