loading

BS Input Sizing

Input Sizing in Forms

Use classes such as .input-lg and .input-sm to specify the height of input components.

Use grid column classes such as.col-lg-* and.col-sm-* to specify element widths.

Height Sizing

------list mukava -----

The examples below illustrate input components with varying heights:

Example

				
					<form>
  <div class="form-group">
    <label for="inputsm">Small input</label>
    <input class="form-control input-sm" id="inputsm" type="text">
  </div>
   <div class="form-group">
    <label for="inputdefault">Default input</label>
    <input class="form-control" id="inputdefault" type="text">
  </div>
  <div class="form-group">
    <label for="inputlg">Large input</label>
    <input class="form-control input-lg" id="inputlg" type="text">
  </div>
</form>
				
			

To easily scale labels and form controls within a Horizontal form, add .form-group-* to the <div class=”form-group”> element.

Example

				
					<div class="form-group form-group-lg">
				
			

Use the .input-group-sm or .input-group-lg classes to instantly scale all inputs and other elements within an .input-group:

Example

				
					<div class="input-group input-group-lg">
				
			

Column Sizing

------list mukava -----

The following examples demonstrate input elements with varying widths using various .col-xs-* classes:

Example

				
					<div class="form-group row">
  <div class="col-xs-2">
    <label for="ex1">col-xs-2</label>
    <input class="form-control" id="ex1" type="text">
  </div>
  <div class="col-xs-3">
    <label for="ex2">col-xs-3</label>
    <input class="form-control" id="ex2" type="text">
  </div>
  <div class="col-xs-4">
    <label for="ex3">col-xs-4</label>
    <input class="form-control" id="ex3" type="text">
  </div>
</div>
				
			

Help Text

To add block-level help text in forms, use the .help-block class.

Example

				
					<div class="form-group">
  <label for="pwd">Password:</label>
  <input type="password" class="form-control" id="pwd" placeholder="Enter password">
  <span class="help-block">This is some help text...</span>
</div>
				
			
Share this Doc

BS Input Sizing

Or copy link

Explore Topic