2017-10-03 19:34:59 +03:00
<!doctype html>
2013-06-23 17:17:08 -07:00
< html lang = "en" >
< head >
< meta charset = "utf-8" >
2015-10-06 12:35:39 +01:00
< meta name = "viewport" content = "width=device-width, initial-scale=1, shrink-to-fit=no" >
2013-06-23 17:17:08 -07:00
< meta name = "description" content = "" >
< meta name = "author" content = "" >
2017-07-16 08:19:20 -05:00
< link rel = "icon" href = "../../../../favicon.ico" >
2013-06-23 17:17:08 -07:00
2013-07-20 23:17:01 -07:00
< title > Grid Template for Bootstrap< / title >
2013-06-23 17:17:08 -07:00
<!-- Bootstrap core CSS -->
2018-06-21 07:31:38 +03:00
< link href = "../../dist/css/bootstrap.min.css" rel = "stylesheet" >
2013-06-23 17:17:08 -07:00
<!-- Custom styles for this template -->
2013-07-20 23:30:08 -07:00
< link href = "grid.css" rel = "stylesheet" >
2013-06-23 17:17:08 -07:00
< / head >
2018-10-21 09:52:13 +02:00
< body class = "py-4" >
2013-06-23 17:17:08 -07:00
< div class = "container" >
2016-02-27 18:16:22 -08:00
< h1 > Bootstrap grid examples< / h1 >
< p class = "lead" > Basic grid layouts to get you familiar with building within the Bootstrap grid system.< / p >
2018-10-21 09:52:13 +02:00
< p > In these examples the < code > .themed-grid-col< / code > class is added to the columns to add some theming. This is not a class that is available in Bootstrap by default.< / p >
2013-06-23 17:17:08 -07:00
2018-10-21 09:52:13 +02:00
< h2 class = "mt-4" > Five grid tiers< / h2 >
2014-12-04 21:02:04 -08:00
< p > There are five tiers to the Bootstrap grid system, one for each range of devices we support. Each tier starts at a minimum viewport size and automatically applies to the larger devices unless overridden.< / p >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-4 themed-grid-col" > .col-4< / div >
< div class = "col-4 themed-grid-col" > .col-4< / div >
< div class = "col-4 themed-grid-col" > .col-4< / div >
2016-10-20 01:45:00 +11:00
< / div >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-sm-4 themed-grid-col" > .col-sm-4< / div >
< div class = "col-sm-4 themed-grid-col" > .col-sm-4< / div >
< div class = "col-sm-4 themed-grid-col" > .col-sm-4< / div >
2016-10-20 01:45:00 +11:00
< / div >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-md-4 themed-grid-col" > .col-md-4< / div >
< div class = "col-md-4 themed-grid-col" > .col-md-4< / div >
< div class = "col-md-4 themed-grid-col" > .col-md-4< / div >
2016-10-20 01:45:00 +11:00
< / div >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-lg-4 themed-grid-col" > .col-lg-4< / div >
< div class = "col-lg-4 themed-grid-col" > .col-lg-4< / div >
< div class = "col-lg-4 themed-grid-col" > .col-lg-4< / div >
2016-10-20 01:45:00 +11:00
< / div >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-xl-4 themed-grid-col" > .col-xl-4< / div >
< div class = "col-xl-4 themed-grid-col" > .col-xl-4< / div >
< div class = "col-xl-4 themed-grid-col" > .col-xl-4< / div >
2016-10-20 01:45:00 +11:00
< / div >
2014-12-04 21:02:04 -08:00
2018-10-21 09:52:13 +02:00
< h2 class = "mt-4" > Three equal columns< / h2 >
2013-08-15 17:39:37 -07:00
< p > Get three equal-width columns < strong > starting at desktops and scaling to large desktops< / strong > . On mobile devices, tablets and below, the columns will automatically stack.< / p >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-md-4 themed-grid-col" > .col-md-4< / div >
< div class = "col-md-4 themed-grid-col" > .col-md-4< / div >
< div class = "col-md-4 themed-grid-col" > .col-md-4< / div >
2013-06-23 17:17:08 -07:00
< / div >
2018-10-21 09:52:13 +02:00
< h2 class = "mt-4" > Three unequal columns< / h2 >
2013-08-15 17:39:37 -07:00
< p > Get three columns < strong > starting at desktops and scaling to large desktops< / strong > of various widths. Remember, grid columns should add up to twelve for a single horizontal block. More than that, and columns start stacking no matter the viewport.< / p >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-md-3 themed-grid-col" > .col-md-3< / div >
< div class = "col-md-6 themed-grid-col" > .col-md-6< / div >
< div class = "col-md-3 themed-grid-col" > .col-md-3< / div >
2013-06-23 17:17:08 -07:00
< / div >
2018-10-21 09:52:13 +02:00
< h2 class = "mt-4" > Two columns< / h2 >
2013-08-15 17:39:37 -07:00
< p > Get two columns < strong > starting at desktops and scaling to large desktops< / strong > .< / p >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-md-8 themed-grid-col" > .col-md-8< / div >
< div class = "col-md-4 themed-grid-col" > .col-md-4< / div >
2013-06-23 17:17:08 -07:00
< / div >
2018-10-21 09:52:13 +02:00
< h2 class = "mt-4" > Full width, single column< / h2 >
< p class = "text-warning" >
No grid classes are necessary for full-width elements.
< / p >
2013-06-23 17:17:08 -07:00
2018-10-21 09:52:13 +02:00
< hr class = "my-4" >
2013-08-15 17:39:37 -07:00
2018-10-21 09:52:13 +02:00
< h2 class = "mt-4" > Two columns with two nested columns< / h2 >
2014-01-25 01:58:54 +01:00
< p > Per the documentation, nesting is easy—just put a row of columns within an existing column. This gives you two columns < strong > starting at desktops and scaling to large desktops< / strong > , with another two (equal widths) within the larger column.< / p >
2013-08-15 17:39:37 -07:00
< p > At mobile device sizes, tablets and down, these columns and their nested columns will stack.< / p >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-md-8 themed-grid-col" >
< div class = "pb-3" >
.col-md-8
< / div >
2013-06-23 17:17:08 -07:00
< div class = "row" >
2018-10-21 09:52:13 +02:00
< div class = "col-md-6 themed-grid-col" > .col-md-6< / div >
< div class = "col-md-6 themed-grid-col" > .col-md-6< / div >
2013-06-23 17:17:08 -07:00
< / div >
< / div >
2018-10-21 09:52:13 +02:00
< div class = "col-md-4 themed-grid-col" > .col-md-4< / div >
2013-06-23 17:17:08 -07:00
< / div >
2018-10-21 09:52:13 +02:00
< hr class = "my-4" >
2013-08-15 17:39:37 -07:00
2018-10-21 09:52:13 +02:00
< h2 class = "mt-4" > Mixed: mobile and desktop< / h2 >
2016-01-09 03:26:54 -08:00
< p > The Bootstrap v4 grid system has five tiers of classes: xs (extra small), sm (small), md (medium), lg (large), and xl (extra large). You can use nearly any combination of these classes to create more dynamic and flexible layouts.< / p >
2013-08-15 17:39:37 -07:00
< p > Each tier of classes scales up, meaning if you plan on setting the same widths for xs and sm, you only need to specify xs.< / p >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-12 col-md-8 themed-grid-col" > .col-12 .col-md-8< / div >
< div class = "col-6 col-md-4 themed-grid-col" > .col-6 .col-md-4< / div >
2013-06-23 17:17:08 -07:00
< / div >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-6 col-md-4 themed-grid-col" > .col-6 .col-md-4< / div >
< div class = "col-6 col-md-4 themed-grid-col" > .col-6 .col-md-4< / div >
< div class = "col-6 col-md-4 themed-grid-col" > .col-6 .col-md-4< / div >
2013-06-23 17:17:08 -07:00
< / div >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-6 themed-grid-col" > .col-6< / div >
< div class = "col-6 themed-grid-col" > .col-6< / div >
2013-06-23 17:17:08 -07:00
< / div >
2018-10-21 09:52:13 +02:00
< hr class = "my-4" >
2013-08-15 17:39:37 -07:00
2018-10-21 09:52:13 +02:00
< h2 class = "mt-4" > Mixed: mobile, tablet, and desktop< / h2 >
< div class = "row mb-3" >
< div class = "col-12 col-sm-6 col-lg-8 themed-grid-col" > .col-12 .col-sm-6 .col-lg-8< / div >
< div class = "col-6 col-lg-4 themed-grid-col" > .col-6 .col-lg-4< / div >
2013-06-23 17:17:08 -07:00
< / div >
2018-10-21 09:52:13 +02:00
< div class = "row mb-3" >
< div class = "col-6 col-sm-4 themed-grid-col" > .col-6 .col-sm-4< / div >
< div class = "col-6 col-sm-4 themed-grid-col" > .col-6 .col-sm-4< / div >
< div class = "col-6 col-sm-4 themed-grid-col" > .col-6 .col-sm-4< / div >
2013-06-23 17:17:08 -07:00
< / div >
< / div > <!-- /container -->
< / body >
< / html >