Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Space between input-groups in bootstrap 3

What is the correct way to create a form with input like the one in the example with proper spacing between each input row?

What am I missing here?

http://bootply.com/98917

like image 270
Julius Avatar asked Dec 06 '13 11:12

Julius


People also ask

How do I add a space between label and textbox in bootstrap?

using . form-group{ margin-bottom: 20px;} works, but best to use bootstrap's builtin and put .

How do you put a space between two input tags in HTML?

The simplest way to add a space in HTML (besides hitting the spacebar) is with the non-breaking space entity, written as   or  . Multiple adjacent non-breaking spaces won't be collapsed by the browser, letting you “force” several visible spaces between words or other page elements.

How do I center a bootstrap input box?

You can use offsets to make a column appear centered, just use an offset equal to half of the remaining size of the row, in your case I would suggest using col-lg-4 with col-lg-offset-4 , that's (12-4)/2 .

What is input group text in bootstrap?

Bootstrap 4 Input Groups input-group class is a container to enhance an input by adding an icon, text or a button in front or behind the input field as a "help text". Use . input-group-prepend to add the help text in front of the input, and . input-group-append to add it behind the input.


1 Answers

You could use form-group to wrap the labels and inputs.

  <div class="form-group">     <label class="control-label col-md-3">X:</label>     <div class="input-group col-md-7">       <input class="form-control" type="text">       <span class="input-group-addon">m</span>     </div>   </div>   <div class="form-group">     <label class="control-label col-md-3">Y:</label>     <div class="input-group col-md-7">       <input class="form-control" type="text">       <span class="input-group-addon">m</span>     </div>   </div>   <div class="form-group">     <label class="control-label col-md-3">Z:</label>     <div class="input-group col-md-7">       <input class="form-control" type="text">       <span class="input-group-addon">m</span>     </div>   </div> 

http://bootply.com/98919

like image 134
Zim Avatar answered Oct 07 '22 19:10

Zim