aboutsummaryrefslogtreecommitdiff
path: root/docs/scaffolding.html
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-09-07 22:34:51 -0700
committerMark Otto <[email protected]>2012-09-07 22:34:51 -0700
commit7e2958121028b4fdfcd40f7d03dd3c37ceba6a51 (patch)
treea357929a7f065cfd2ad2498412e224eb2d0df458 /docs/scaffolding.html
parentcb46ddee72eb45f835504a625947c821c8f60635 (diff)
parentf29f98501c11678e2ecfe8fd5c842adcd5a40091 (diff)
downloadbootstrap-7e2958121028b4fdfcd40f7d03dd3c37ceba6a51.tar.xz
bootstrap-7e2958121028b4fdfcd40f7d03dd3c37ceba6a51.zip
Merge branch '2.1.2-wip' into box-sizing-exercise
Conflicts: docs/scaffolding.html docs/templates/pages/scaffolding.mustache
Diffstat (limited to 'docs/scaffolding.html')
-rw-r--r--docs/scaffolding.html154
1 files changed, 129 insertions, 25 deletions
diff --git a/docs/scaffolding.html b/docs/scaffolding.html
index 08d0dceb8..db4f84599 100644
--- a/docs/scaffolding.html
+++ b/docs/scaffolding.html
@@ -178,7 +178,7 @@
<p>Given this example, we have <code>.span4</code> and <code>.span8</code>, making for 12 total columns and a complete row.</p>
<h2>Offsetting columns</h2>
- <p>Move columns to the left using <code>.offset*</code> classes. Each class increases the left margin of a column by a whole column. For example, <code>.offset4</code> moves <code>.span4</code> over four columns.</p>
+ <p>Move columns to the right using <code>.offset*</code> classes. Each class increases the left margin of a column by a whole column. For example, <code>.offset4</code> moves <code>.span4</code> over four columns.</p>
<div class="bs-docs-grid">
<div class="row show-grid">
<div class="span4">4</div>
@@ -203,8 +203,8 @@
<h2>Nesting columns</h2>
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to the number of columns of its parent.</p>
<div class="row show-grid">
- <div class="span12">
- Level 1 of column
+ <div class="span9">
+ Level 1 column
<div class="row show-grid">
<div class="span6">
Level 2
@@ -221,7 +221,111 @@
Level 1 column
&lt;div class="row"&gt;
&lt;div class="span6"&gt;Level 2&lt;/div&gt;
- &lt;div class="span6"&gt;Level 2&lt;/div&gt;
+ &lt;div class="span3"&gt;Level 2&lt;/div&gt;
+ &lt;/div&gt;
+ &lt;/div&gt;
+&lt;/div&gt;
+</pre>
+ </section>
+
+
+
+ <!-- Fluid grid system
+ ================================================== -->
+ <section id="fluidGridSystem">
+ <div class="page-header">
+ <h1>Fluid grid system</h1>
+ </div>
+
+ <h2>Live fluid grid example</h2>
+ <p>The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.</p>
+ <div class="bs-docs-grid">
+ <div class="row-fluid show-grid">
+ <div class="span1">1</div>
+ <div class="span1">1</div>
+ <div class="span1">1</div>
+ <div class="span1">1</div>
+ <div class="span1">1</div>
+ <div class="span1">1</div>
+ <div class="span1">1</div>
+ <div class="span1">1</div>
+ <div class="span1">1</div>
+ <div class="span1">1</div>
+ <div class="span1">1</div>
+ <div class="span1">1</div>
+ </div>
+ <div class="row-fluid show-grid">
+ <div class="span4">4</div>
+ <div class="span4">4</div>
+ <div class="span4">4</div>
+ </div>
+ <div class="row-fluid show-grid">
+ <div class="span4">4</div>
+ <div class="span8">8</div>
+ </div>
+ <div class="row-fluid show-grid">
+ <div class="span6">6</div>
+ <div class="span6">6</div>
+ </div>
+ <div class="row-fluid show-grid">
+ <div class="span12">12</div>
+ </div>
+ </div>
+
+ <h3>Basic fluid grid HTML</h3>
+ <p>Make any row "fluid" by changing <code>.row</code> to <code>.row-fluid</code>. The column classes stay the exact same, making it easy to flip between fixed and fluid grids.</p>
+<pre class="prettyprint linenums">
+&lt;div class="row-fluid"&gt;
+ &lt;div class="span4"&gt;...&lt;/div&gt;
+ &lt;div class="span8"&gt;...&lt;/div&gt;
+&lt;/div&gt;
+</pre>
+
+ <h2>Fluid offsetting</h2>
+ <p>Operates the same way as the fixed grid system offsetting: add <code>.offset*</code> to any column to offset by that many columns.</p>
+ <div class="bs-docs-grid">
+ <div class="row-fluid show-grid">
+ <div class="span4">4</div>
+ <div class="span4 offset4">4 offset 4</div>
+ </div><!-- /row -->
+ <div class="row-fluid show-grid">
+ <div class="span3 offset3">3 offset 3</div>
+ <div class="span3 offset3">3 offset 3</div>
+ </div><!-- /row -->
+ <div class="row-fluid show-grid">
+ <div class="span6 offset6">6 offset 6</div>
+ </div><!-- /row -->
+ </div>
+<pre class="prettyprint linenums">
+&lt;div class="row-fluid"&gt;
+ &lt;div class="span4"&gt;...&lt;/div&gt;
+ &lt;div class="span4 offset2"&gt;...&lt;/div&gt;
+&lt;/div&gt;
+</pre>
+
+ <h2>Fluid nesting</h2>
+ <p>Nesting with fluid grids is a bit different: the number of nested columns should not match the parent's number of columns. Instead, each level of nested columns are reset because each row takes up 100% of the parent column.</p>
+ <div class="row-fluid show-grid">
+ <div class="span12">
+ Fluid 12
+ <div class="row-fluid show-grid">
+ <div class="span6">
+ Fluid 6
+ </div>
+ <div class="span6">
+ Fluid 6
+ </div>
+ </div>
+ </div>
+ </div>
+<pre class="prettyprint linenums">
+&lt;div class="row-fluid"&gt;
+ &lt;div class="span12"&gt;
+ Fluid 12
+ &lt;div class="row-fluid"&gt;
+ &lt;div class="span6"&gt;Fluid 6&lt;/div&gt;
+ &lt;div class="span6"&gt;Fluid 6&lt;/div&gt;
+>>>>>>> 2.1.2-wip
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
@@ -312,14 +416,16 @@
</thead>
<tbody>
<tr>
- <td>Phones</td>
- <td>480px and below</td>
- <td class="muted" colspan="2">Fluid columns, no fixed widths</td>
+ <td>Large display</td>
+ <td>1200px and up</td>
+ <td>70px</td>
+ <td>30px</td>
</tr>
<tr>
- <td>Phones to tablets</td>
- <td>767px and below</td>
- <td class="muted" colspan="2">Fluid columns, no fixed widths</td>
+ <td>Default</td>
+ <td>980px and up</td>
+ <td>60px</td>
+ <td>20px</td>
</tr>
<tr>
<td>Portrait tablets</td>
@@ -328,31 +434,29 @@
<td>20px</td>
</tr>
<tr>
- <td>Default</td>
- <td>980px and up</td>
- <td>60px</td>
- <td>20px</td>
+ <td>Phones to tablets</td>
+ <td>767px and below</td>
+ <td class="muted" colspan="2">Fluid columns, no fixed widths</td>
</tr>
<tr>
- <td>Large display</td>
- <td>1200px and up</td>
- <td>70px</td>
- <td>30px</td>
+ <td>Phones</td>
+ <td>480px and below</td>
+ <td class="muted" colspan="2">Fluid columns, no fixed widths</td>
</tr>
</tbody>
</table>
<pre class="prettyprint linenums">
-/* Landscape phones and down */
-@media (max-width: 480px) { ... }
-
-/* Landscape phone to portrait tablet */
-@media (max-width: 767px) { ... }
+/* Large desktop */
+@media (min-width: 1200px) { ... }
/* Portrait tablet to landscape and desktop */
@media (min-width: 768px) and (max-width: 979px) { ... }
-/* Large desktop */
-@media (min-width: 1200px) { ... }
+/* Landscape phone to portrait tablet */
+@media (max-width: 767px) { ... }
+
+/* Landscape phones and down */
+@media (max-width: 480px) { ... }
</pre>