html - How to center input label and input in a row? -
html - How to center input label and input in a row? -
i have code:
<div class="well"> <form role="form" id="shop-order" method="post" action=""> <div class="row"> <div class="form-group"> <div class="col-md-3"> <div class="pull-right"> <label for="name">label</label> </div> </div> <div class="col-md-6"> <select class="form-control" name="clientid"> $options </select> </div> </div> </div> // perchance other rows... </div>
the result of code on image:
i don't how can center label , input in row. want them on 1 line: middle of label opposite middle of input.
how can this? or html wrong , can achieved right html?
i looking bootstrap method, understand, can achieved line-height
. line-height
if wouldn't find bootstrap solution. looking bootstrap solution.
bootstrap provides horizontal forms style seems you're looking for: http://getbootstrap.com/css/#forms-horizontal
working fiddle: http://jsfiddle.net/nv9q5/1/
code:
<div class="well"> <form class="form-horizontal"> <div class="form-group"> <label for="name" class="col-sm-2 control-label">ФИО Клиента</label> <div class="col-sm-10 col-md-10"> <select class="form-control" name="clientid"> <option>one</option> </select> </div> </div> </form> </div>
html css twitter-bootstrap-3 centering
Comments
Post a Comment