Offsetting columns using Bootstrap

Offsetting columns

We can move columns to the right using .col-lg-offset-* classes. These classes increase the left margin of a column by * columns.

For example, .col-lg-offset-4 moves .col-lg-4 over four columns.


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

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