Bootstrap Tutorial - Layout main content before sidebars








The following code shows how to layout main content before sidebars.

Example

<!DOCTYPE html>
<html>
<head>
<link
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css"
rel="stylesheet">
<link
href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css"
rel="stylesheet">
<style type='text/css'>
.span6 {<!--from  ww  w.  j  a  va2 s . c o  m-->
  background-color: pink;
}
</style>
</head>
<body>
  <div class="container">
    <div class="row">
      <div class="span9">
        <div class="row">
          <div class="span6 pull-right">main content</div>
          <div class="span3">left bar</div>
        </div>
        <!-- end nested row -->
      </div>
      <!-- end span9 -->
      <div class="span3">right bar</div>
    </div>
    <!-- end parent row-->
  </div>
  <!-- end container -->
</body>
</html>

Click to view the demo