Pages UI
Search…
Grid
Bootstrap grid includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes predefined classes for easy layout options, as well as powerful mixins for generating more semantic layouts

Introduction

Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here's how the Bootstrap grid system works:
    You must start with row
    There are pre-define classes of columns starting from 1 to 12, example col-md-1 to col-md-12
    Each of these value represent a percentage of the screen, 1 being the smallest and 12 being 100%
    You can create different grid pattern that finally forms 12
    eg :
    1
    <div class="row">
    2
    <div class="col-md-1">.col-md-1</div>
    3
    <div class="col-md-1">.col-md-1</div>
    4
    <div class="col-md-1">.col-md-1</div>
    5
    <div class="col-md-1">.col-md-1</div>
    6
    <div class="col-md-1">.col-md-1</div>
    7
    <div class="col-md-1">.col-md-1</div>
    8
    <div class="col-md-1">.col-md-1</div>
    9
    <div class="col-md-1">.col-md-1</div>
    10
    <div class="col-md-1">.col-md-1</div>
    11
    <div class="col-md-1">.col-md-1</div>
    12
    <div class="col-md-1">.col-md-1</div>
    13
    <div class="col-md-1">.col-md-1</div>
    14
    </div>
    15
    <div class="row">
    16
    <div class="col-md-8">.col-md-8</div>
    17
    <div class="col-md-4">.col-md-4</div>
    18
    </div>
    19
    <div class="row">
    20
    <div class="col-md-4">.col-md-4</div>
    21
    <div class="col-md-4">.col-md-4</div>
    22
    <div class="col-md-4">.col-md-4</div>
    23
    </div>
    24
    <div class="row">
    25
    <div class="col-md-6">.col-md-6</div>
    26
    <div class="col-md-6">.col-md-6</div>
    27
    </div>
    Copied!
    There different grids for different screen sizes, "col-md" md stands for medium screen, the following table explains
    EXTRA SMALL DEVICES PHONES (<768PX)
    SMALL DEVICESTABLETS (≥768PX)
    MEDIUM DEVICESDESKTOPS (≥992PX)
    LARGE DEVICESDESKTOPS (≥1200PX)
    Grid behavior
    Horizontal at all times
    Collapsed to start, horizontal above breakpoints
    Container width
    None (auto)
    750px
    970px
    1170px
    Class prefix
    .col-xs-
    .col-sm-
    .col-md-
    .col-lg-
    # of columns
    12
    Column width
    Auto
    ~62px
    ~81px
    ~97px
    Gutter width
    30px (15px on each side of a column)
    Nestable
    Yes
    Offsets
    Yes
    Column ordering
    Yes
Last modified 3yr ago
Copy link
Contents
Introduction