Bootstrap Tutorial - Put inline form inside a well








The following code shows how to put inline form inside a well.

Example

<!--from   w w  w  . ja v  a  2  s . com-->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet"
  href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet"
  href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script
  src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script
  src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

</head>
<body style='margin:30px'>
    <div class="container">
      <!-- Inline Form -->
      <div class="well well-sm">
          <form class="form-inline">
              <div class="form-group">
                  <input type="email" class="form-control" id="emailField" placeholder="Enter email">
              </div>
              
              <div class="form-group">
                  <input type="password" class="form-control" id="passwordField" placeholder="Password">
              </div>
              
              <div class="checkbox">
                  <label>
                    <input type="checkbox"> Remember me
                  </label>
              </div>
              
              <button type="submit" class="btn btn-primary">Sign in</button>
          </form>
      </div>
    </div>
</body>
</html>

Click to view the demo