}
}
-.bd-example-row-intro {
- .container {
- padding: 1px;
- border: 1px solid rgba($red,.5);
- }
- .row {
- padding: 1px;
- border: 1px solid rgba($blue,.5);
- }
-}
-
.bd-example-row-flex-cols .row {
min-height: 10rem;
background-color: rgba(255,0,0,.1);
Bootstrap's grid system uses a series of containers, rows, and columns to layout and align content. It's built with flexbox and is fully responsive. Below is an example and an in-depth look at how the grid comes together.
-<div class="bd-example bd-example-row bd-example-row-intro">
+<div class="bd-example bd-example-row">
<div class="container">
<div class="row">
<div class="col-sm">
Breaking it down, here's how it works:
-- Containers (outlined in blue above) provide a means to center your site's contents. Use `.container` for fixed width or `.container-fluid` for full width.
-- Rows (outlined in red above) are horizontal groups of columns that ensure your columns are lined up properly. We use the negative margin method on `.row` to ensure all your content is aligned properly down the left side.
+- Containers provide a means to center your site's contents. Use `.container` for fixed width or `.container-fluid` for full width.
+- Rows are horizontal groups of columns that ensure your columns are lined up properly. We use the negative margin method on `.row` to ensure all your content is aligned properly down the left side.
- Content should be placed within columns, and only columns may be immediate children of rows.
- Thanks to flexbox, grid columns without a set width will automatically layout with equal widths. For example, four instances of `.col-sm` will each automatically be 25% wide for small breakpoints.
- Column classes indicate the number of columns you'd like to use out of the possible 12 per row. So, if you want three equal-width columns, you can use `.col-sm-4`.