Bootstrap Tutorial - Mix grid and ungrid together








The following code shows how to mix grid and ungrid together.

Example

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
  href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<style type='text/css'>
.half {<!--from   ww w.jav a2s  .c  om-->
  margin: 0px;
  background-color: #EEE;
  width: 50%;
  float: left;
}
</style>
</head>
<body style='margin:30px'>
  <div class="row-fluid">
    <div class="span12">
      <div class="half">First</div>
      <div class="half">Second</div>
    </div>
  </div>
  <!--row END-->
  <div class="half">Ungrid First</div>
  <div class="half">Ungrid Second</div>
  <p>You can mix gridded rows with ungridded elements too</p>
  <div class="row-fluid">
    <div class="span12">
      <div class="half">Grid First</div>
      <div class="half">Grid Second</div>
    </div>
  </div>
  <!--row END-->
</body>
</html>

Click to view the demo