Multi-Column Grid Layout for All Devices - HTML CSS Bootstrap

HTML CSS examples for Bootstrap:Grid Layout

Description

Multi-Column Grid Layout for All Devices

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
 <head> 
  <meta charset="utf-8"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <title>Example of Bootstrap 3 Multi-Column Grid Layout for All Devices</title> 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

  <style type="text/css">
    p{<!--   ww w . j  a va  2 s.  c  o m-->
        padding: 50px;
        font-size: 32px;
        font-weight: bold;
        text-align: center;
        background: #dbdfe5;
    }
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="row"> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 1</p>
    </div> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 2</p>
    </div> 
    <div class="clearfix visible-sm-block"></div> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 3</p>
    </div> 
    <div class="clearfix visible-md-block"></div> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 4</p>
    </div> 
    <div class="clearfix visible-sm-block"></div> 
    <div class="clearfix visible-lg-block"></div> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 5</p>
    </div> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 6</p>
    </div> 
    <div class="clearfix visible-sm-block"></div> 
    <div class="clearfix visible-md-block"></div> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 7</p>
    </div> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 8</p>
    </div> 
    <div class="clearfix visible-sm-block"></div> 
    <div class="clearfix visible-lg-block"></div> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 9</p>
    </div> 
    <div class="clearfix visible-md-block"></div> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 10</p>
    </div> 
    <div class="clearfix visible-sm-block"></div> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 11</p>
    </div> 
    <div class="col-sm-6 col-md-4 col-lg-3">
     <p>Box 12</p>
    </div> 
   </div> 
  </div>   
 </body>
</html>

Related Tutorials