aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-08-15 20:43:55 -0700
committerMark Otto <[email protected]>2013-08-15 20:43:55 -0700
commitc4b59fc1caab59fdc0220d8ad1a8b0df00c7fa56 (patch)
tree2cc54b64ab4c30050dd4a2c4508b7fbe0cb54a1e
parent111bdc4e93ffd61b08736e7ec87699dc4a8d3ca2 (diff)
downloadbootstrap-c4b59fc1caab59fdc0220d8ad1a8b0df00c7fa56.tar.xz
bootstrap-c4b59fc1caab59fdc0220d8ad1a8b0df00c7fa56.zip
fixes #9663: third part, document the resets
-rw-r--r--_includes/nav-css.html2
-rw-r--r--css.html15
2 files changed, 15 insertions, 2 deletions
diff --git a/_includes/nav-css.html b/_includes/nav-css.html
index e363df52b..f5226ec5e 100644
--- a/_includes/nav-css.html
+++ b/_includes/nav-css.html
@@ -20,7 +20,7 @@
<li><a href="#grid-example-basic">Ex: Stacked-to-horizonal</a></li>
<li><a href="#grid-example-mixed">Ex: Mobile-desktop</a></li>
<li><a href="#grid-example-mixed-complete">Ex: Mobile, tablet, desktop</a></li>
- <li><a href="#grid-responsive-clearing">Responsive column clearing</a></li>
+ <li><a href="#grid-responsive-resets">Responsive column resets</a></li>
<li><a href="#grid-offsetting">Offset columns</a></li>
<li><a href="#grid-nesting">Nested columns</a></li>
<li><a href="#grid-column-ordering">Column ordering</a></li>
diff --git a/css.html b/css.html
index 64751da93..2b2ffc234 100644
--- a/css.html
+++ b/css.html
@@ -322,7 +322,7 @@ base_url: "../"
<p><a class="btn btn-danger" target="_blank" href="http://examples.getbootstrap.com/grid/">More grid examples</a></p>
</div>
- <h3 id="grid-responsive-clearing">Responsive column clearing</h3>
+ <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="../css#responsive-utilities">responsive utility classes</a>.</p>
{% highlight html %}
<div class="row">
@@ -336,6 +336,19 @@ base_url: "../"
<div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
</div>
{% endhighlight %}
+ <p>In addition to column clearing at responsive breakpoints, you may need to <strong>reset offsets, pushes, or pulls</strong>. Those resets are available for medium and large grid tiers only, since they start only at the (second) small grid tier.</p>
+{% highlight html %}
+<div class="row">
+ <div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div>
+ <div class="col-sm-5 col-sm-offset-2 col-md-6 col-md-offset-0">.col-sm-5 .col-sm-offset-2 .col-md-6 .col-md-offset-0</div>
+</div>
+
+<div class="row">
+ <div class="col-sm-6 col-md-5 col-lg-6">.col-sm-6 .col-md-5 .col-lg-6</div>
+ <div class="col-sm-6 col-md-5 col-md-offset-2 col-lg-6 col-lg-offset-0">.col-sm-6 .col-md-5 .col-md-offset-2 .col-lg-6 .col-lg-offset-0</div>
+</div>
+{% endhighlight %}
+
<h3 id="grid-offsetting">Offsetting columns</h3>
<p>Move columns to the right using <code>.col-md-offset-*</code> classes. These classes increase the left margin of a column by <code>*</code> columns. For example, <code>.col-md-offset-4</code> moves <code>.col-md-4</code> over four columns.</p>