Size all inputs and other elements inside an .input-group with the .input-group-sm or .input-group-lg classes: - HTML CSS Bootstrap

HTML CSS examples for Bootstrap:Form Control

Description

Size all inputs and other elements inside an .input-group with the .input-group-sm or .input-group-lg classes:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head><!--from   w  w  w . j a va  2s  . co m-->
<body>

<div class="container">
  <h1>Input Group Size</h1>
  <form>
    <div class="input-group input-group-lg">
      <input type="text" class="form-control" placeholder="Search">
      <div class="input-group-btn">
        <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
      </div>
    </div>
  </form>
  <br>

  <p>Use the .input-group-sm if you want a small input group:</p>
  <form>
    <div class="input-group input-group-sm">
      <input type="text" class="form-control" placeholder="Search">
      <div class="input-group-btn">
        <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
      </div>
    </div>
  </form>
</div>

</body>
</html>

Related Tutorials