Bootstrap Tutorial - Create even columns with col-6








The following code shows how to create even columns with col-6.

Example

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.8.3.js'></script>
<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>
<style type='text/css'>
.container {<!--from w  w  w. ja v a  2 s  . com-->
  background: green;
  overflow: hidden;
}
.row>* {
  background: blue;
  color: #fff;
}
.row :first-child {
  background: red;
}
/* Overwrite bootsrap */
.row-offset-0 {
  margin-left: 0;
  margin-right: 0;
}

.row-offset-0>* {
  padding-left: 0;
  padding-right: 0;
}
</style>
</head>
<body>
  <div class="container">
    <div class="row row-offset-0">
      <div class="col-6 col-sm-6 col-lg-6">Col 1</div>
      <div class="col-6 col-sm-6 col-lg-6">Col 2</div>
    </div>
  </div>
</body>
</html>

Click to view the demo