Bootstrap Tutorial - Create vertical form








The following code shows how to create vertical form.

Example

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.8.3.js'></script>
<script type='text/javascript'
  src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.0/bootstrap.min.js"></script>
<style type='text/css'>
@import url('http://getbootstrap.com/dist/css/bootstrap.css');
</style><!-- w ww.  j a va2  s  .  c o m-->
</head>
<body style='margin:30px'>
  <div class="row">
    <div class="col-lg-2">
      <div class="panel">
        <fieldset>
          <legend>Legend</legend>
          <div class="radio">
            <label> 
               <input type="radio" 
                      name="optionsRadios"
                    id="optionsRadios1" 
                    value="option1" checked> Option one
            </label>
          </div>
        </fieldset>
      </div>
    </div>
    <div class="col-lg-2">
      <div class="panel">
        <fieldset>
          <legend>Legend</legend>
          <div class="form-group">
            <label for="exampleInputEmail"> Email address</label> 
            <input type="text" class="form-control" id="exampleInputEmail"
              placeholder="Enter email">
          </div>
        </fieldset>
      </div>
    </div>
  </div>
</body>
</html>

Click to view the demo