Bootstrap Tutorial - Create inline form








The following code shows how to create inline form.

Example

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.0/css/bootstrap-combined.min.css">
<style type='text/css'>
body {<!--from   w  w w .j a v a  2  s  .  c  o  m-->
  margin-top: 30px;
}
</style>
</head>
<body>
  <div class="row">
    <form class="form-inline">
      <fieldset>
        <label class="control-label">
        <strong>Strong:</strong></label> 
        <input type="text" class="input-mini"> 
        <label class="control-label">
          <strong>Strong:</strong>
        </label> 
        <input type="text" class="input-mini"> 
        <input type="button" value="Clear" class="btn btn-default btn-clear"> 
        <input type="submit" value="Los!" class="btn btn-primary">
      </fieldset>
    </form>
  </div>
</body>
</html>

Click to view the demo