Bootstrap Tutorial - Create page header with pull right/left








The following code shows how to create page header with pull right/left.

Example

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.0/css/bootstrap-combined.min.css">
<script type='text/javascript'
  src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.0/js/bootstrap.min.js"></script>
<style type='text/css'>
.btn-group {<!--from ww  w  .j a  v  a 2s .  com-->
  bottom: 15px;
  position: relative;
  top: 15px;
}
</style>
</head>
<body>
  <div class="container">
    <section>
      <div class="page-header">
        <h3 class="pull-left">The header</h3>
        <div class="pull-right">
          <div class="btn-group">
            <button class="btn btn-primary">Actions</button>
            <button class="btn btn-primary dropdown-toggle"
              data-toggle="dropdown">
              <span class="caret"></span>
            </button>
            <ul class="dropdown-menu pull-right">
              <li><a href="#">Action</a></li>
              <li><a href="#">Another Action</a></li>
            </ul>
          </div>
        </div>
        <div class="clearfix"></div>
      </div>
      Contents
    </section>
  </div>
</body>
</html>

Click to view the demo