input fields bs v3

input fields bs v3

by Brandon Mize

HTML

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"
      rel="stylesheet">
      
<div class="container">
  <h1>My form</h1>

  <p>How to make these input fields small and retain the layout.</p>

  <form role="form" class="row">
    <div class="form-group col-lg-1">
      <label for="code">Name</label>
      <input type="text" class="form-control">
    </div>

    <div class="form-group col-lg-1 ">
      <label for="code">Email</label>
      <input type="text" class="form-control input-normal">
    </div>



    <button type="submit" class="btn btn-default">Submit</button>
  </form>
</div>

CSS

/* Set width on the form input elements since they're 100% wide by default */
  
  input,
  select,
  textarea {
    max-width: 280px;
  }