Bootstrap Tutorial - Layout form label and control with col-lg-2 and col-lg-10








The following code shows how to layout form label and control with col-lg-2 and col-lg-10.

Example

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-git2.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://getbootstrap.com/assets/css/docs.css">
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
<script type='text/javascript'
  src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
</head><!--from w  w  w . j av  a2  s .  c  o m-->
<body style='margin:30px'>
  <form class="form-horizontal">
    <div class="form-group">
      <label for="inputDate" class="col-lg-2 control-label">Birthday</label>
      <div class="col-lg-10">
        <input type="date" class="form-control" id="inputDate"
          placeholder="10/01/2010">
      </div>
    </div>
  </form>

</body>
</html>

Click to view the demo