We all know Bootstrap, as it's the most popular open source web framework. Mark Otto and Jacob Thorton managed to create one of the most powerful CSS frameworks ever designed.
When Bootstrap 3 was released, the most interesting change was the difference in the grid systems. Bootstrap 2 catered to two different browser sizes (desktop and then mobile). With Bootstrap 3, you now build with mobile in mind first, and the grid system lets you create different grids based on browser size. A similar trend is observed in the most recent version of the framework - Alpha Release of the Bootstrap 4.
Bootstrap 2 |
Bootstrap 3 |
Bootstrap 4 |
The grid you create works on desktops and then stacks on top of each other when browser size is below 767px. This is limited since you can only define 1 grid on desktop sized browsers. You are left with a stacked grid on mobile devices. | The new Bootstrap grid system applies to mobile first. When you declare a specific grid size that is the grid for that size and above. | The latest Bootstrap version offers improved grid system with a new tier that allows you to target mobile users better than ever before. Additionally, semantic mixins have undergone the major update as well. From now on you can access all the necessary mixins in any place out of the box. |
This can be a little hard to grasp at first so here’s an example. Let’s say you want a site that has:
Since the grid system now cascades up from mobile devices, this is how this code will look.
We don’t have to define anything for extra small devices since the default is one column. We have to define a grid size for small devices, but not for medium devices. This is because the grid cascades up. So if you define a size at sm, then it will be that grid size for sm, md, and lg. We’ll explain the different grid sizes and how you create them and then show examples.
This is the best part about the new grid system. You could realistically have your site show a different grid on 4 different browser sizes. Below is the breakdown of the different sizes.
.col-xs-$ Extra Small Phones Less than 768px .col-sm-$ Small Devices Tablets 768px and Up .col-md-$ Medium Devices Desktops 992px and Up .col-lg-$ Large Devices Large Desktops 1200px and Up |
The official Bootstrap docs offer a much more comprehensive understanding of how the grid works. Take a look at those to get a more solid overview of column sizes, gutter sizes, maximum column sizes, and the max-width of your overall site based on browser size.
Sometimes you will need to use media queries to get your site to act the way you’d like it to. Knowing the default grid sizes is essential to extending the Bootstrap grid. We’ve written up a quick tip to show you the default sizes so take a look if you need the Bootstrap media queries and breakpoints.
Bootstrap 3 is a mobile-first front-end framework. I’ve included the correct order for the Media Queries below, but I’ve also included at the bottom of them the non-mobile first breakpoints in case some people aren’t used to the mobile-first methodology since technically both will work. Min-Width: Refers to everything greater than or equal to the amount given. Max-Width: Refers to everything less than or equal to the amount given.
/*================================================== = Bootstrap 3 Media Queries = ==================================================*/ /*========== Mobile First Method ==========*/ /* Custom, iPhone Retina */ @media only screen and (min-width : 320px){ } /* Extra Small Devices, Phones */ @media only screen and (min-width : 480px){ } /* Small Devices, Tablets */ @media only screen and (min-width : 768px){ } /* Medium Devices, Desktops */ @media only screen and (min-width : 992px){ } /* Large Devices, Wide Screens */ @media only screen and (min-width : 1200px){ } /*========== Non-Mobile First Method ==========*/ /* Large Devices, Wide Screens */ @media only screen and (max-width : 1200px){ } /* Medium Devices, Desktops */ @media only screen and (max-width : 992px){ } /* Small Devices, Tablets */ @media only screen and (max-width : 768px){ } /* Extra Small Devices, Phones */ @media only screen and (max-width : 480px){ } /* Custom, iPhone Retina */ @media only screen and (max-width : 320px){ } |
/*===================================================== = Bootstrap 2.3.2 Media Queries = =====================================================*/ @media only screen and (max-width : 1200px){ } @media only screen and (max-width : 979px){ } @media only screen and (max-width : 767px){ } @media only screen and (max-width : 480px){ } @media only screen and (max-width : 320px){ } |
Just like Bootstrap 2, Bootstrap 3 provides responsive utilities for hiding and showing elements based on the browser size. This will also help us in defining our grid system.
.visible-xs .visible-sm .visible-md .visible-lg .hidden-xs .hidden-sm .hidden-md .hidden-lg |
This helps because we are able to show certain elements based on size. In our examples today, we’ll be showing an extra sidebar on large desktops.
Here are a few examples of the grids that you can create. We’ll go through some basic sites that some people might want and show how easy it is to build that site with the Bootstrap 3 grid.
Let’s say you wanted a site to have 1 column on extra small (phone) and small (tablet) devices, 2 columns on medium (medium desktop) devices, and 4 columns on large (desktop) devices.
Here is the code for that example:
This is an interesting example and one that the new grid excels at. Let’s say you have a site that has a sidebar and a main content section. For extra small devices, you want one column, main content with the sidebar stacked below it. For small and medium devices, we want sidebar and main content to sit side by side. Now for large devices, we want to utilize the space on larger devices. We want to add an extra sidebar to show more content. We change the size of the main content to span 6 columns on large devices to make room for our second sidebar. This is a great way to utilize the space on larger desktops. And here is the code for that example.
This will be a more complex example. Let’s say that at no point in our grid system do we want all of our columns to stack. For extra small devices, we want 2 columns. For small devices, we want 3 columns. For medium devices, we want 4 columns. For large devices, we want 6 columns (one that only shows on large devices).
You get the drill now. Let’s just straight into the example and code.
You can see that as the browser size gets smaller, the columns start to form. Also, the content inside each will begin stacking.
You can see how easily it is to build complex and dynamic sites with the Bootstrap 3 grid. From mobile 2 column sites to complex hiding and showing elements on large desktops, you can build any type of site. Hopefully, these examples will give you an idea of the flexibility of the new grid system and all the great things you can create.
Happy Coding J.
If you already have an HTML-based website with an existing admin panel, you might want to review our Bootstrap Admin Themes built with Bootstrap functionality. These bootstrap themes will show you the full power of Bootstrap 3!
Subscribe to our newsletter and access exclusive content and offers available only to MonsterPost subscribers.
Very good write-up. I absolutely love this website. Keep writing!|
Somebody essentially assist to make seriously posts I would state .
Dogu anadolu tarafında VİP transferde bir numara.
My brother suggested I might like this web site.
He was totally right. This post truly made my day.
You can not imagine just how much time I had spent for this information! Thanks!
özel uçak kiralama
özel jet kiralama
they will obtain benefit from it I am sure.
You are invited to my blog that I created and manageblog
lips
botox injections for your bladder
is getting bladder botox paintful
evden eve nakliyat
… [Trackback]
[…] There you can find 36285 more Information to that Topic: monsterspost.com/bootstrap-3-grid-system-guide/ […]
Chevrolet Yedek parça
botox failures
Ofis ve parça eşya taşıma işlemlerinde güvenli taşımacılık ile tanışın. Siz de evden eve ve şehirler arası nakliyat işlemlerinizde güvenilir bir firmadan hizmet alın.
Türkiye’nin en başarılı şehir içi nakliyat fiması ile evden eve taşımacılık artık çok kolay. Parça eşya taşıma, ofis taşıma ve şehirler arası nakliyat işlemleriniz için kaliteden ödün vermeyin.
Maslak elektrikçi
Levent elektrikçi
illegal
first phorm protein
ucuz zeytinyağı
sağlıklı zeytinyağı,
SEO Analiz Google Sıralama Yarışması
first phorm
how does botox help tmj
dünyanın en pahalı telefonu
Beylikdüzü Elektrikçi
Beylikdüzü elektrikçi
bodrum boyacı ustası
Esenyurt elektrikçi
eşya depolama
Mum esansları
Soya wax
İstanbul ev eşyası depolama
işitme cihazı
Ispartakule elektrikçi
teknede iftar
almond eye surgery iran
Kraft çanta
Teknede İftar
kadıköy eşya depolama
Kraft Çanta
Fuar Çantası
notebook tamiri
chat
kadıköy eşya depolama
Bağcılar elektrikçi
Saz şemsiye
Su sebil temizliği
Su deposu temizliği
E-Ticaret Yazılımı
Kurumsal Seo Hizmeti
Seo Hizmetleri
gıda takviyesi
köklendirici
juul
konnektör
Ataşehir eşya depolama
konnektör
Adana oto kiralama
Yat kiralama
bursa fabrika temizlik
economy news
oyun haberleri
buy instagram mentions
… [Trackback]
[…] Information to that Topic: monsterspost.com/bootstrap-3-grid-system-guide/ […]
botox botox near me botox before and after
dolpx
dolpx
lip botox
Who Can Not Have Botox
Is there any harm to the baby from having Botox while pregnant
botox blog
dolpx
botox
insta free photo download
https://play.google.com/store/apps/details?id=com.sanalexpress.walpapers
https://infomaw.com
https://gymsozluk.com
android free instagram reels download
instagram ios featured download
featured download instagram
… [Trackback]
[…] Here you will find 19946 more Info on that Topic: monsterspost.com/bootstrap-3-grid-system-guide/ […]
downloader instagram
download instagram igtv to phone
free instagram image download for android
https://whovv.com
ig featured downloader
https://whovv.com
https://whovv.com
android instagram featured download
download reels instagram to computer
https://whovv.com
can you drink after botox
can you drink after botox
can you drink after botox
İcra dosyalarınızı takip edebileceğiniz ve devam eden mahkemelerinizle ilgili detayları görebileceğiniz icra sorgulama hizmeti e Devlet Kapısı’nda. İnternet ortamında sorgulama yaparak dosya numarasından, dosya türüne kadar birçok bilgiye erişebilirsiniz. İşte icra dosyası sorgulama işlemi hakkında bilmeniz gerekenler…
can you drink after botox
https://gymsozluk.com
https://gymsozluk.com
https://gymsozluk.com
https://gymsozluk.com
https://gymsozluk.com
https://www.gogegi.com/how-to-write-an-essay
https://www.gogegi.com/how-to-gain-weight-fast-in-1-week
https://www.gogegi.com/4th-stimulus-checks
https://www.gogegi.com/how-to-close-account
https://www.gogegi.com/how-to-delete-instagram-account-on-iphone-2021
Addison Rae Tiktok
https://infomaw.com/
https://infomaw.com/
Buy Tiktok Followers
https://infomaw.com/
https://infomaw.com/
Iphone Background Download
chris bumstead
chris bumstead
chris bumstead
Sheboygan Scanner
How To Delete Apps On Mac
chris bumstead
… [Trackback]
[…] Here you can find 11963 more Info to that Topic: monsterspost.com/bootstrap-3-grid-system-guide/ […]
download videos from instagram
instagram android image download
https://images.google.com.bo/url?q=https://www.gogegi.com
http://www.google.com.sg/url?q=https://www.gogegi.com
http://www.google.gr/url?q=https://www.gogegi.com
https://maps.google.sn/url?q=https://www.gogegi.com
https://maps.google.mu/url?q=https://www.gogegi.com
https://images.google.pn/url?q=https://www.gogegi.com
How To Lucid Dream
twitagra
twitagra
twitagra
twitagra
https://gymsozluk.com
https://gymsozluk.com
https://gymsozluk.com
https://gymsozluk.com
ipad instagram photo download
https://www.iginsta.com
https://www.iginsta.com
https://www.iginsta.com
https://www.iginsta.com
https://infomaw.com
https://infomaw.com
https://infomaw.com
https://infomaw.com
https://www.gogegi.com
https://www.gogegi.com
https://www.gogegi.com
ios quality instagram video download
janet layug
… [Trackback]
[…] Here you can find 55891 additional Information on that Topic: monsterspost.com/bootstrap-3-grid-system-guide/ […]
ez bar curl
sitio de descarga de videos gratis de instagram
ig profil resmi indirme programı
cass martin
image download
ìomhaigh instagram coimpiutair luchdachadh sìos
… [Trackback]
[…] Find More Info here to that Topic: monsterspost.com/bootstrap-3-grid-system-guide/ […]
… [Trackback]
[…] Find More Info here to that Topic: monsterspost.com/bootstrap-3-grid-system-guide/ […]
@media screen and (max-width: 767px) {
}
@media screen and (min-width: 768px) and (max-width: 991px){
}
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape){
}
@media screen and (min-width: 992px) {
}
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
}
/* Small Devices, Tablets */
@media only screen and (min-width : 768px) {
}
/* Medium Devices, Desktops */
@media only screen and (min-width : 992px) {
}
/* Large Devices, Wide Screens */
@media only screen and (min-width : 1200px) {
}