How to use Bootstrap Grid layout system

Get to know Bootstrap Grid layout system

By default the grid layout system of Bootstrap has 12 columns.

We use the row class to mark the row div container and then use the col-lg-* to mark each cell. All * adds up should be equal to 12.


<!DOCTYPE HTML>
<html> 
<head> 
<link href="http://java2s.com/style/bootstrap.min.css" rel="stylesheet">
<style>div{background:#eee;border:1px solid #DDD;}</style>
<!--from   w w w .  ja  va2s  . c  o m-->
</head>
<body style='margin:20px;'>


    <div class="row">
      <div class="col-lg-8">8</div>
      <div class="col-lg-4">4</div>
    </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