Bootstrap grid system

Bootstrap provides us a 12-column layout , which is called Bootstrap grid system. It divides , a screen into twelve equal ( columns ) parts .

What is Bootstrap ?

Bootstrap is an front-end framework for HTML , CSS, Java Script for designing websites and web applications . Here is the important points that makes bootstrap a first choice front-end web-development :

  • It was originally known as , Twitter Blueprint . It was developed by Mark Otto and Jocob Thornton in August , 2011 .
  • The current version of bootstrap is Bootstrap 4.
  • It is used for responsive, mobile-first web designing.
  • The term responsive means , the layout of website varies according to device. For example , When we open the website on laptop , it may have four columns horizontally ( left to right ). And same website may have single column  ( next columns automatically adjusts top-bottom ) when we opens it on mobile.
  • There are various

What is framework ?

We have discuss earlier, bootstrap is a front-end framework . But now question arises , what is framework . In simple words , we can say that framework is a system which provides us some predefined functionalities .

Let’s take an real life example , Suppose you want a house , and you buy a ready-made house. You just have to do a little change there according to you . There is no need to pay extra efforts in making it from starting . This is the same as framework .In framework , there are some predefined classes and functions , we need not to create them . We just use them whenever we want .

Bootstrap Grid System

Bootstrap  provides us a 12-column layout , which is called Bootstrap grid system. It divides , a screen into twelve equal ( columns ) parts . The screen size may be anything like as mobile , laptop, desktop etc , it divides screen into equal twelve parts . These columns automatically adjusts , when screen size changed . Same website opened on large screen displays different from same website on small screen.

We can say that bootstrap’s grid system is full responsive , and columns re-arranges according to the screen size .

Bootstrap screen sizes and classes

Bootstrap provides responsive web-designing for different screen sizes . There are different classes for different screen sizes . It divides screens into following parts :

Sr. No.

Class Name

Screen Size

Example

1 xs less than 768px

screen size >768px

mobile phones
2 sm greater than or equal to 768px

screen size >=  768px

tablets , large mobile phones
3 md greater than or equal to 992px

screen size >= 992px

small laptops etc.
4 lg greater than or equal to 1200px

screen size >= 1200px

laptops , desktops etc.

Bootstrap Grid Structure

Here is the basic structure of grid system with equal columns :

Example : Equal columns

<!DOCTYPE html>
<html>
  <head>
    <title>BS Grid System</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  </head>
  <body>
    <div class="container text-center">
      <div class="row">
        <div class="col-md-12 bg-danger" style='height:100px;'>col-md-12
        </div>
      </div>
      <div class="row">
        <div class="col-md-6 bg-info" style='height:100px;'>col-md-6
        </div>
        <div class="col-md-6 bg-warning" style='height:100px;'>col-md-6
        </div>
      </div>
      <div class="row">
        <div class="col-md-4 bg-primary" style='height:100px;'>col-md-4
        </div>
        <div class="col-md-4 bg-danger" style='height:100px;'>col-md-4
        </div>
        <div class="col-md-4 bg-primary" style='height:100px;'>col-md-4
        </div>
      </div>
      <div class="row">
        <div class="col-md-3 bg-success" style='height:100px;'>col-md-3
        </div>
        <div class="col-md-3 bg-info" style='height:100px;'>col-md-3
        </div>
        <div class="col-md-3 bg-success" style='height:100px;'>col-md-3
        </div>
        <div class="col-md-3 bg-warning" style='height:100px;'>col-md-3
        </div>
      </div>
      <div class="row">
        <div class="col-md-2" style='height:100px; background-color:#c4a89d;'>col-md-2
        </div>
        <div class="col-md-2" style='height:100px; background-color:#6de082;'>col-md-2
        </div>
        <div class="col-md-2" style='height:100px; background-color:#65b9ed;'>col-md-2
        </div>
        <div class="col-md-2" style='height:100px; background-color:#e88dad;'>col-md-2
        </div>
        <div class="col-md-2" style='height:100px; background-color:#f9b3f2;'>col-md-2
        </div>
        <div class="col-md-2" style='height:100px; background-color:#928de8;'>col-md-2
        </div>
      </div>
      <div class="row">
        <div class="col-md-1" style='height:100px; background-color:#e8a4a4;'>col-md-1
        </div>
        <div class="col-md-1" style='height:100px; background-color:#68b54a;'>col-md-1
        </div>
        <div class="col-md-1" style='height:100px; background-color:#cce01a;'>col-md-1
        </div>
        <div class="col-md-1" style='height:100px; background-color:#1dd62a;'>col-md-1
        </div>
        <div class="col-md-1" style='height:100px; background-color:#ea77db;'>col-md-1
        </div>
        <div class="col-md-1" style='height:100px; background-color:#2bf263;'>col-md-1
        </div>
        <div class="col-md-1" style='height:100px; background-color:#ed558f;'>col-md-1
        </div>
        <div class="col-md-1" style='height:100px; background-color:#67eaea;'>col-md-1
        </div>
        <div class="col-md-1" style='height:100px; background-color:#e079b5;'>col-md-1
        </div>
        <div class="col-md-1" style='height:100px; background-color:#e88dad;'>col-md-1
        </div>
        <div class="col-md-1" style='height:100px; background-color:#2345dd;'>col-md-1
        </div>
        <div class="col-md-1" style='height:100px; background-color:#ea4f6c;'>col-md-1
        </div>
      </div>
    </div>
  </body>
</html>

Output

grid system
grid system

Example : Un-equal columns

<!DOCTYPE html>
<html>
  <head>
    <title>BS Grid system</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  </head>
  <body>
    <div class="container text-center">
      <div class="row">
        <div class="col-md-4 bg-success" style="height:100px">
          col-md-4
        </div>
        <div class="col-md-8 bg-danger" style="height:100px">
          col-md-8
        </div>
        <div class="col-md-10 bg-primary" style="height:100px">
          col-md-10
        </div>
        <div class="col-md-2 bg-warning" style="height:100px">
          col-md-2
        </div>
      </div>
    </div>
  </body>
</html>

Output

grid system
grid system

Explanation

  • As you can see in the example, we are using md class, for medium screen.
  • Try to minimize the screen , when the screen size >  768px the column will adjust one by one.
  • In example 2, you can see we have define row one time. The screen takes only size of 12 column . When column exceed than 12 , it automatically adjusts in next line.

So , it is all about today’s article , Hope you guys enjoyed the article . Thanks.

68 thoughts on “Bootstrap grid system

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Thanks on your marvelous posting! I seriously enjoyed reading it, you will be a great author.I will make certain to bookmark your blog and definitely will come back very soon. I want to encourage you to ultimately continue your great writing, have a nice day!

  2. We’re a group of volunteers and opening a new scheme in our community.
    Your site offered us with valuable info to work on. You have done a formidable job and our
    entire community will be grateful to you.

  3. Magnificent goods from you, man. I’ve understand your stuff previous to and you are just extremely excellent. I really like what you have acquired here, really like what you are stating and the way in which you say it. You make it entertaining and you still take care of to keep it sensible. I can not wait to read far more from you. This is actually a wonderful web site.

  4. I think this is among the most important info for me. And i’m glad reading your article. But want to remark on few general things, The web site style is wonderful, the articles is really nice : D. Good job, cheers

  5. excellent post, very informative. I wonder why the other specialists of this sector do not realize this. You should proceed your writing. I am confident, you have a huge readers’ base already!

  6. I loved as much as you’ll receive carried out right here. The sketch is tasteful, your authored subject matter stylish. nonetheless, you command get bought an edginess over that you wish be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly very often inside case you shield this hike.

  7. I just want to say I am just newbie to weblog and truly savored you’re web blog. Very likely I’m likely to bookmark your website . You amazingly have fantastic posts. Cheers for revealing your web-site.

  8. I merely wished to generate a quick comment in an effort to express gratitude back for all those wonderful pointers that you are posting at this site. Time consuming internet investigation has right at the end during the day been rewarded with top quality strategies to share with my guests. I would state that most of us traffic are truly endowed to appear in a fantastic network with lots of marvellous people with useful hints. I’m quite privileged to get used your webpages and appear forward to really more fabulous minutes reading here. Thanks again for many things.

  9. Wonderful paintings! This is the kind of info that are meant to be shared around the net. Shame on Google for now not positioning this put up higher! Come on over and consult with my web site . Thanks =)

  10. An impressive share! I have just forwarded this onto a friend
    who has been doing a little homework on this.
    And he actually bought me dinner because I found
    it for him… lol. So let me reword this….
    Thanks for the meal!! But yeah, thanx for spending the time
    to talk about this subject here on your internet site.

  11. Greetings from California! I’m bored at work so I decided to check out your website on my iphone during lunch
    break. I really like the knowledge you present here and can’t wait to take a
    look when I get home. I’m shocked at how quick your blog loaded on my mobile ..
    I’m not even using WIFI, just 3G .. Anyways, wonderful site!

  12. Hey There. I discovered your blog using msn. This is an extremely well written article.

    I will make sure to bookmark it and return to read more of your helpful info.
    Thank you for the post. I’ll definitely return.

  13. Hello would you mind letting me know which hosting company you’re working with?
    I’ve loaded your blog in 3 different browsers and I must say this blog loads a lot faster then most.
    Can you suggest a good hosting provider at a fair
    price? Kudos, I appreciate it!

  14. Every weekend i used to go to see this web page, because i
    wish for enjoyment, for the reason that this this website conations really nice funny information too.

  15. I liked up to you’ll receive performed right here. The sketch is tasteful, your authored subject matter stylish. nonetheless, you command get bought an shakiness over that you would like be turning in the following. unwell indisputably come further beforehand again as precisely the same just about very often inside of case you defend this increase.

  16. you’re really a just right webmaster. The website loading velocity is amazing. It kind of feels that you are doing any distinctive trick. Moreover, The contents are masterwork. you’ve performed a fantastic activity on this topic!

  17. Сегодня очень важно посмотреть какую-то спортивную игру в срок. Бывают такие случаи, что транслируется АПЛ или Копа Америка, а футбол в вашем регионе не транслируют. Чтобы выйти из этой неприятной ситуации, советуем подобрать портал, где реально смотреть игры через интернет.

    На 24stream.ru у вас есть возможность смотреть интересные спортивные игры онлайн. Смотреть live NBA или смотреть live KHL вы можете мгновенно, как перейдёте на сайт. На веб-странице доступна турнирная таблица любых мероприятий. Большое количество девушек сейчас увлекаются баскетболом. Этот вид спорта считается одним из крутых в мире. Смотреть за любимой немецкой командой стало теперь еще легче!

    Вам потребуются результаты матчей NHL, но вы не понимаете English? Не стоит волноваться. Вы можете легко смотреть матчи онлайн. На портале доступны просмотры английских лиг, ирландской лиги и азиатской. Отметим и то, что последние матчи ЧМ 2018 в РФ записаны и их можно просмотреть на сайте. Качество трансляций невероятно высокое, а задержка при передаче видео отсутствует.

    На портале вы можете посмотреть повторы матчей Лиги чемпионов прошлого турнира у нас на сайте, как и Турнирная таблица НХЛ ,если вас привлекают другие спортивные трансляции, то они также доступны всем пользователям. К примеру, смотреть Формула 1 live вы можете в отличном качестве.

    Иногда случается так, что человек задерживается в институте. А посмотреть захватывающие матчи в премьер-лиге Великобритании невероятно хочется, так как это – чемпионат Англии. Премьер-лига Великобритании не похожа на остальные премьер-лиги, в связи с этим пропустить это невозможно! Если вы стремитесь смотреть live чемпионат Великобритании, наблюдать за любимчиком игроком вовремя игры, лучше смотреть трансляцию в хорошем качестве на сайте.

    Сегодня достаточно много баров синхронизируются с сайтом и транслируют известные матчи. Благодаря современным технологиям, интернет позволяет отображать малейшие детали. Именно благодаря этому вы можете смотреть за всеми событиями вовремя матча.

    Смотреть live Чемпионат Германии очень просто. Вам необходимо выбрать интересующий вас стрим и включить трансляцию. Даже если у вас ужасный интернет, матч будет грузиться быстро. За важными событиями и за работой веб-страницы смотрит администрация. Вы можете обращаться к специалистам по любому вопросу. Они посодействуют решить неполадки вовремя видеотрансляции или подскажут, как быть в любой ситуации.

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.