Create Small Grid Layout

Description

The following code shows how to create Small Grid Layout.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-2.0.2.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<script type='text/javascript'
  src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css">
<style type='text/css'>
body {<!--from ww  w . j  a va2 s  .  c om-->
  margin: 10px;
}

.rowCell {
  background: white;
  padding: 4px;
}

.rowCell img {
  width: 100%;
}
</style>
</head>
<body>
  <div class="container">
    <div class="row">
      <div class="col-xs-6 col-sm-3 col-md-3 well rowCell">
        <img src="http://lorempixel.com/1500/600/abstract/1" /> <input
          type="checkbox" id="char1" /> <label for="char1">Label 1</label>
      </div>
      <div class="col-xs-6 col-sm-3 col-md-3 well rowCell">
        <img src="http://lorempixel.com/1500/600/abstract/2" /> <input
          type="checkbox" id="char2" /> <label for="char2">Label 2</label>
      </div>
      <div class="col-xs-6 col-sm-3 col-md-3 well rowCell">
        <img src="http://lorempixel.com/1500/600/abstract/3" /> <input
          type="checkbox" id="char3" /> <label for="char3">Label 3</label>
      </div>
      <div class="col-xs-6 col-sm-3 col-md-3 well rowCell">
        <img src="http://lorempixel.com/1500/600/abstract/4" /> <input
          type="checkbox" id="char4" /> <label for="char4">Label 5</label>
      </div>
    </div>
  </div>
  <!-- Post Info -->
  <div
    style='position: fixed; bottom: 0; left: 0; background: lightgray; width: 100%;'>
    Find documentation: <a href='http://getbootstrap.com/css/'>Get
      Bootstrap 3.0</a><br /> Fork This Skeleton Here <a
      href='http://jsfiddle.net/KyleMit/kcpma/'>Bootrsap 3.0 Skeleton</a><br />
    External JS File: <a
      href='http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js'>bootstrap.min.js</a><br />
    External Style Sheet: <a
      href='http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js'>bootstrap.min.css</a><br />
    External Fonts / Icons: <a
      href='http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css'>font-awesome.min.css</a>
    <div>
</body>
</html>

Click to view the demo





















Home »
  Bootstrap »
    Example »




Accordion
Alert
Auto Complete
Badge
Breadcrum
Button
Carousel
Collapse
Dialog
Dropdown
Form
Icon
Jumbotron
Label
Layout
List
List Group
Media
Navigation Bar
Pager
Page Header
Panel
Paragraph
Pills
Popover
ProgressBar
ScrollSpy
Switch
Tab
Table
Thumnail
Tooltip
Tree
Well