Bootstrap Tutorial - Height Sizing Form Controls








The following code shows how to height Sizing Form Controls.

Example

<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet"
  href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
<link rel="stylesheet"
  href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css">
<script type="text/javascript"
  src="http://code.jquery.com/jquery.min.js"></script>
<script
  src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<style type="text/css">
.bs-example {<!--from  w  ww . j  a  v a 2s  . c  o m-->
  margin: 20px;
}
</style>
</head>
<body>
  <div class="bs-example">
    <form>
      <div class="row">
        <div class="col-xs-6">
          <input type="text" class="form-control input-lg"
            placeholder="Larger input">
        </div>
        <div class="col-xs-6">
          <select class="form-control input-lg">
            <option>Larger select</option>
          </select>
        </div>
      </div>
      <br>
      <div class="row">
        <div class="col-xs-6">
          <input type="text" class="form-control" placeholder="Default input">
        </div>
        <div class="col-xs-6">
          <select class="form-control">
            <option>Default select</option>
          </select>
        </div>
      </div>
      <br>
      <div class="row">
        <div class="col-xs-6">
          <input type="text" class="form-control input-sm"
            placeholder="Smaller input">
        </div>
        <div class="col-xs-6">
          <select class="form-control input-sm">
            <option>Smaller select</option>
          </select>
        </div>
      </div>
    </form>
  </div>
</body>
</html>

Click to view the demo