diff options
Diffstat (limited to 'docs/_includes/css')
| -rw-r--r-- | docs/_includes/css/grid.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/_includes/css/grid.html b/docs/_includes/css/grid.html index 992612e85..0deb12458 100644 --- a/docs/_includes/css/grid.html +++ b/docs/_includes/css/grid.html @@ -13,6 +13,7 @@ <li>Columns create gutters (gaps between column content) via <code>padding</code>. That padding is offset in rows for the first and last column via negative margin on <code>.row</code>s.</li> <li>The negative margin is why the examples below are outdented. It's so that content within grid columns is lined up with non-grid content.</li> <li>Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns would use three <code>.col-xs-4</code>.</li> + <li>If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.</li> <li>Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, applying any <code>.col-md-</code> class to an element will not only affect its styling on medium devices but also on large devices if a <code>.col-lg-</code> class is not present.</li> </ul> <p>Look to the examples for applying these principles to your code.</p> @@ -254,6 +255,23 @@ </div> {% endhighlight %} + <h3 id="grid-example-wrapping">Example: Column wrapping</h3> + <p>If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.</p> + <div class="bs-docs-grid"> + <div class="row show-grid"> + <div class="col-xs-9">.col-xs-9</div> + <div class="col-xs-4">.col-xs-4<br>Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.</div> + <div class="col-xs-6">.col-xs-6<br>Subsequent columns continue along the new line.</div> + </div> + </div> +{% highlight html %} +<div class="row"> + <div class="col-xs-9">.col-xs-9</div> + <div class="col-xs-4">.col-xs-4<br>Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.</div> + <div class="col-xs-6">.col-xs-6<br>Subsequent columns continue along the new line.</div> +</div> +{% endhighlight %} + <h3 id="grid-responsive-resets">Responsive column resets</h3> <p>With the four tiers of grids available you're bound to run into issues where, at certain breakpoints, your columns don't clear quite right as one is taller than the other. To fix that, use a combination of a <code>.clearfix</code> and our <a href="#responsive-utilities">responsive utility classes</a>.</p> <div class="bs-docs-grid"> |
