3.0.0 -> 3.0.1
[bootswatch] / bower_components / bootstrap / css.html
1 ---
2 layout: default
3 title: CSS
4 slug: css
5 lead: "Global CSS settings, fundamental HTML elements styled and enhanced with extensible classes, and an advanced grid system."
6 base_url: "../"
7 ---
8
9
10   <!-- Global Bootstrap settings
11   ================================================== -->
12   <div class="bs-docs-section">
13     <div class="page-header">
14       <h1 id="overview">Overview</h1>
15     </div>
16     <p class="lead">Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.</p>
17
18     <h3 id="overview-doctype">HTML5 doctype</h3>
19     <p>Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.</p>
20 {% highlight html %}
21 <!DOCTYPE html>
22 <html lang="en">
23   ...
24 </html>
25 {% endhighlight %}
26
27     <h3 id="overview-mobile">Mobile first</h3>
28     <p>With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, <strong>Bootstrap is mobile first</strong>. Mobile first styles can be found throughout the entire library instead of in separate files.</p>
29     <p>To ensure proper rendering and touch zooming, <strong>add the viewport meta tag</strong> to your <code>&lt;head&gt;</code>.</p>
30 {% highlight html %}
31 <meta name="viewport" content="width=device-width, initial-scale=1.0">
32 {% endhighlight %}
33     <p>You can disable zooming capabilities on mobile devices by adding <code>user-scalable=no</code> to the viewport meta tag. This disables zooming, meaning users are only able to scroll, and results in your site feeling a bit more like a native application. Overall we don't recommend this on every site, so use caution!</p>
34 {% highlight html %}
35 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
36 {% endhighlight %}
37
38     <h3 id="overview-responsive-images">Responsive images</h3>
39     <p>Images in Bootstrap 3 can be made responsive-friendly via the addition of the <code>.img-responsive</code> class. This applies <code>max-width: 100%;</code> and <code>height: auto;</code> to the image so that it scales nicely to the parent element.</p>
40 {% highlight html %}
41 <img src="..." class="img-responsive" alt="Responsive image">
42 {% endhighlight %}
43
44     <h3 id="overview-type-links">Typography and links</h3>
45     <p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p>
46     <ul>
47       <li>Set <code>background-color: #fff;</code> on the <code>body</code></li>
48       <li>Use the <code>@font-family-base</code>, <code>@font-size-base</code>, and <code>@line-height-base</code> attributes as our typographic base</li>
49       <li>Set the global link color via <code>@link-color</code> and apply link underlines only on <code>:hover</code></li>
50     </ul>
51     <p>These styles can be found within <code>scaffolding.less</code>.</p>
52
53     <h3 id="overview-normalize">Normalize</h3>
54     <p>For improved cross-browser rendering, we use <a href="http://necolas.github.io/normalize.css/" target="_blank">Normalize</a>, a project by <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallagher</a> and <a href="http://twitter.com/jon_neal" target="_blank">Jonathan Neal</a>.</p>
55
56     <h3 id="overview-container">Containers</h3>
57     <p>Easily center a page's contents by wrapping its contents in a <code>.container</code>. Containers set <code>max-width</code> at various media query breakpoints to match our grid system.</p>
58 {% highlight html %}
59 <div class="container">
60   ...
61 </div>
62 {% endhighlight %}
63   </div>
64
65
66
67   <!-- Grid system
68   ================================================== -->
69   <div class="bs-docs-section">
70     <div class="page-header">
71       <h1 id="grid">Grid system</h1>
72     </div>
73     <p class="lead">Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes <a href="#grid-example-basic">predefined classes</a> for easy layout options, as well as powerful <a href="#grid-less">mixins for generating more semantic layouts</a>.</p>
74
75     <h3 id="grid-intro">Introduction</h3>
76     <p>Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here's how the Bootstrap grid system works:</p>
77     <ul>
78       <li>Rows must be placed within a <code>.container</code> for proper alignment and padding.</li>
79       <li>Use rows to create horizontal groups of columns.</li>
80       <li>Content should be placed within columns, and only columns may be immediate children of rows.</li>
81       <li>Predefined grid classes like <code>.row</code> and <code>.col-xs-4</code> are available for quickly making grid layouts. LESS mixins can also be used for more semantic layouts.</li>
82       <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>
83       <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>
84     </ul>
85     <p>Look to the examples for applying these principles to your code.</p>
86
87     <div class="bs-callout bs-callout-info">
88       <h4>Grids and full-width layouts</h4>
89       <p>Folks looking to create fully fluid layouts (meaning your site stretches the entire width of the viewport) must wrap their grid content in a containing element with <code>padding: 0 15px;</code> to offset the <code>margin: 0 -15px;</code> used on <code>.row</code>s.</p>
90     </div>
91
92     <h3 id="grid-media-queries">Media queries</h3>
93     <p>We use the following media queries in our LESS files to create the key breakpoints in our grid system.</p>
94 {% highlight css %}
95 /* Extra small devices (phones, less than 768px) */
96 /* No media query since this is the default in Bootstrap */
97
98 /* Small devices (tablets, 768px and up) */
99 @media (min-width: @screen-sm-min) { ... }
100
101 /* Medium devices (desktops, 992px and up) */
102 @media (min-width: @screen-md-min) { ... }
103
104 /* Large devices (large desktops, 1200px and up) */
105 @media (min-width: @screen-lg-min) { ... }
106 {% endhighlight %}
107     <p>We occasionally expand on these media queries to include a <code>max-width</code> to limit CSS to a narrower set of devices.</p>
108 {% highlight css %}
109 @media (max-width: @screen-xs-max) { ... }
110 @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { ... }
111 @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { ... }
112 @media (min-width: @screen-lg-min) { ... }
113 {% endhighlight %}
114
115     <h3 id="grid-options">Grid options</h3>
116     <p>See how aspects of the Bootstrap grid system work across multiple devices with a handy table.</p>
117     <div class="table-responsive">
118       <table class="table table-bordered table-striped">
119         <thead>
120           <tr>
121             <th></th>
122             <th>
123               Extra small devices
124               <small>Phones (&lt;768px)</small>
125             </th>
126             <th>
127               Small devices
128               <small>Tablets (&ge;768px)</small>
129             </th>
130             <th>
131               Medium devices
132               <small>Desktops (&ge;992px)</small>
133             </th>
134             <th>
135               Large devices
136               <small>Desktops (&ge;1200px)</small>
137             </th>
138           </tr>
139         </thead>
140         <tbody>
141           <tr>
142             <th>Grid behavior</th>
143             <td>Horizontal at all times</td>
144             <td colspan="3">Collapsed to start, horizontal above breakpoints</td>
145           </tr>
146           <tr>
147             <th>Max container width</th>
148             <td>None (auto)</td>
149             <td>750px</td>
150             <td>970px</td>
151             <td>1170px</td>
152           </tr>
153           <tr>
154             <th>Class prefix</th>
155             <td><code>.col-xs-</code></td>
156             <td><code>.col-sm-</code></td>
157             <td><code>.col-md-</code></td>
158             <td><code>.col-lg-</code></td>
159           </tr>
160           <tr>
161             <th># of columns</th>
162             <td colspan="4">12</td>
163           </tr>
164           <tr>
165             <th>Max column width</th>
166             <td class="text-muted">Auto</td>
167             <td>60px</td>
168             <td>78px</td>
169             <td>95px</td>
170           </tr>
171           <tr>
172             <th>Gutter width</th>
173             <td colspan="4">30px (15px on each side of a column)</td>
174           </tr>
175           <tr>
176             <th>Nestable</th>
177             <td colspan="4">Yes</td>
178           </tr>
179           <tr>
180             <th>Offsets</th>
181             <td colspan="1" class="text-muted">N/A</td>
182             <td colspan="3">Yes</td>
183           </tr>
184           <tr>
185             <th>Column ordering</th>
186             <td class="text-muted">N/A</td>
187             <td colspan="3">Yes</td>
188           </tr>
189         </tbody>
190       </table>
191     </div>
192     <p>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.</p>
193
194     <h3 id="grid-example-basic">Example: Stacked-to-horizontal</h3>
195     <p>Using a single set of <code>.col-md-*</code> grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns in any <code>.row</code>.</p>
196     <div class="bs-docs-grid">
197       <div class="row show-grid">
198         <div class="col-md-1">.col-md-1</div>
199         <div class="col-md-1">.col-md-1</div>
200         <div class="col-md-1">.col-md-1</div>
201         <div class="col-md-1">.col-md-1</div>
202         <div class="col-md-1">.col-md-1</div>
203         <div class="col-md-1">.col-md-1</div>
204         <div class="col-md-1">.col-md-1</div>
205         <div class="col-md-1">.col-md-1</div>
206         <div class="col-md-1">.col-md-1</div>
207         <div class="col-md-1">.col-md-1</div>
208         <div class="col-md-1">.col-md-1</div>
209         <div class="col-md-1">.col-md-1</div>
210       </div>
211       <div class="row show-grid">
212         <div class="col-md-8">.col-md-8</div>
213         <div class="col-md-4">.col-md-4</div>
214       </div>
215       <div class="row show-grid">
216         <div class="col-md-4">.col-md-4</div>
217         <div class="col-md-4">.col-md-4</div>
218         <div class="col-md-4">.col-md-4</div>
219       </div>
220       <div class="row show-grid">
221         <div class="col-md-6">.col-md-6</div>
222         <div class="col-md-6">.col-md-6</div>
223       </div>
224     </div>
225 {% highlight html %}
226 <div class="row">
227   <div class="col-md-1">.col-md-1</div>
228   <div class="col-md-1">.col-md-1</div>
229   <div class="col-md-1">.col-md-1</div>
230   <div class="col-md-1">.col-md-1</div>
231   <div class="col-md-1">.col-md-1</div>
232   <div class="col-md-1">.col-md-1</div>
233   <div class="col-md-1">.col-md-1</div>
234   <div class="col-md-1">.col-md-1</div>
235   <div class="col-md-1">.col-md-1</div>
236   <div class="col-md-1">.col-md-1</div>
237   <div class="col-md-1">.col-md-1</div>
238   <div class="col-md-1">.col-md-1</div>
239 </div>
240 <div class="row">
241   <div class="col-md-8">.col-md-8</div>
242   <div class="col-md-4">.col-md-4</div>
243 </div>
244 <div class="row">
245   <div class="col-md-4">.col-md-4</div>
246   <div class="col-md-4">.col-md-4</div>
247   <div class="col-md-4">.col-md-4</div>
248 </div>
249 <div class="row">
250   <div class="col-md-6">.col-md-6</div>
251   <div class="col-md-6">.col-md-6</div>
252 </div>
253 {% endhighlight %}
254
255     <h3 id="grid-example-mixed">Example: Mobile and desktop</h3>
256     <p>Don't want your columns to simply stack in smaller devices? Use the extra small and medium device grid classes by adding <code>.col-xs-*</code> <code>.col-md-*</code> to your columns. See the example below for a better idea of how it all works.</p>
257     <div class="bs-docs-grid">
258       <div class="row show-grid">
259         <div class="col-xs-12 col-md-8">.col-xs-12 .col-md-8</div>
260         <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
261       </div>
262       <div class="row show-grid">
263         <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
264         <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
265         <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
266       </div>
267       <div class="row show-grid">
268         <div class="col-xs-6">.col-xs-6</div>
269         <div class="col-xs-6">.col-xs-6</div>
270       </div>
271     </div>
272 {% highlight html %}
273 <!-- Stack the columns on mobile by making one full-width and the other half-width -->
274 <div class="row">
275   <div class="col-xs-12 col-md-8">.col-xs-12 .col-md-8</div>
276   <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
277 </div>
278
279 <!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
280 <div class="row">
281   <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
282   <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
283   <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
284 </div>
285
286 <!-- Columns are always 50% wide, on mobile and desktop -->
287 <div class="row">
288   <div class="col-xs-6">.col-xs-6</div>
289   <div class="col-xs-6">.col-xs-6</div>
290 </div>
291 {% endhighlight %}
292
293     <h3 id="grid-example-mixed-complete">Example: Mobile, tablet, desktops</h3>
294     <p>Build on the previous example by creating even more dynamic and powerful layouts with tablet <code>.col-sm-*</code> classes.</p>
295     <div class="bs-docs-grid">
296       <div class="row show-grid">
297         <div class="col-xs-12 col-sm-6 col-md-8">.col-xs-12 .col-sm-6 .col-md-8</div>
298         <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
299       </div>
300       <div class="row show-grid">
301         <div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
302         <div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
303         <!-- Optional: clear the XS cols if their content doesn't match in height -->
304         <div class="clearfix visible-xs"></div>
305         <div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
306       </div>
307     </div>
308 {% highlight html %}
309 <div class="row">
310   <div class="col-xs-12 col-sm-6 col-md-8">.col-xs-12 .col-sm-6 .col-md-8</div>
311   <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
312 </div>
313 <div class="row">
314   <div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
315   <div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
316   <!-- Optional: clear the XS cols if their content doesn't match in height -->
317   <div class="clearfix visible-xs"></div>
318   <div class="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div>
319 </div>
320 {% endhighlight %}
321
322     <h3 id="grid-responsive-resets">Responsive column resets</h3>
323     <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>
324 <div class="bs-docs-grid">
325   <div class="row show-grid">
326     <div class="col-xs-6 col-sm-3">
327       .col-xs-6 .col-sm-3
328       <br>
329       Resize your viewport or check it out on your phone for an example.
330     </div>
331     <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
332
333     <!-- Add the extra clearfix for only the required viewport -->
334     <div class="clearfix visible-xs"></div>
335
336     <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
337     <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
338   </div>
339 </div>
340 {% highlight html %}
341 <div class="row">
342   <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
343   <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
344
345   <!-- Add the extra clearfix for only the required viewport -->
346   <div class="clearfix visible-xs"></div>
347
348   <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
349   <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
350 </div>
351 {% endhighlight %}
352     <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. See this in action in <a href="../examples/grid/">the grid example</a>.</p>
353 {% highlight html %}
354 <div class="row">
355   <div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div>
356   <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>
357 </div>
358
359 <div class="row">
360   <div class="col-sm-6 col-md-5 col-lg-6">.col-sm-6 .col-md-5 .col-lg-6</div>
361   <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>
362 </div>
363 {% endhighlight %}
364
365
366     <h3 id="grid-offsetting">Offsetting columns</h3>
367     <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>
368     <div class="bs-docs-grid">
369       <div class="row show-grid">
370         <div class="col-md-4">.col-md-4</div>
371         <div class="col-md-4 col-md-offset-4">.col-md-4 .col-md-offset-4</div>
372       </div>
373       <div class="row show-grid">
374         <div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
375         <div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
376       </div>
377       <div class="row show-grid">
378         <div class="col-md-6 col-md-offset-3">.col-md-6 .col-md-offset-3</div>
379       </div>
380     </div>
381 {% highlight html %}
382 <div class="row">
383   <div class="col-md-4">.col-md-4</div>
384   <div class="col-md-4 col-md-offset-4">.col-md-4 .col-md-offset-4</div>
385 </div>
386 <div class="row">
387   <div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
388   <div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
389 </div>
390 <div class="row">
391   <div class="col-md-6 col-md-offset-3">.col-md-6 .col-md-offset-3</div>
392 </div>
393 {% endhighlight %}
394
395
396     <h3 id="grid-nesting">Nesting columns</h3>
397     <p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.col-md-*</code> columns within an existing <code>.col-md-*</code> column. Nested rows should include a set of columns that add up to 12.</p>
398     <div class="row show-grid">
399       <div class="col-md-9">
400         Level 1: .col-md-9
401         <div class="row show-grid">
402           <div class="col-md-6">
403             Level 2: .col-md-6
404           </div>
405           <div class="col-md-6">
406             Level 2: .col-md-6
407           </div>
408         </div>
409       </div>
410     </div>
411 {% highlight html %}
412 <div class="row">
413   <div class="col-md-9">
414     Level 1: .col-md-9
415     <div class="row">
416       <div class="col-md-6">
417         Level 2: .col-md-6
418       </div>
419       <div class="col-md-6">
420         Level 2: .col-md-6
421       </div>
422     </div>
423   </div>
424 </div>
425 {% endhighlight %}
426
427     <h3 id="grid-column-ordering">Column ordering</h3>
428     <p>Easily change the order of our built-in grid columns with <code>.col-md-push-*</code> and <code>.col-md-pull-*</code> modifier classes.</p>
429     <div class="row show-grid">
430       <div class="col-md-9 col-md-push-3">.col-md-9 .col-md-push-3</div>
431       <div class="col-md-3 col-md-pull-9">.col-md-3 .col-md-pull-9</div>
432     </div>
433
434 {% highlight html %}
435 <div class="row">
436   <div class="col-md-9 col-md-push-3">.col-md-9 .col-md-push-3</div>
437   <div class="col-md-3 col-md-pull-9">.col-md-3 .col-md-pull-9</div>
438 </div>
439 {% endhighlight %}
440
441     <h3 id="grid-less">LESS mixins and variables</h3>
442     <p>In addition to <a href="#grid-example-basic">prebuilt grid classes</a> for fast layouts, Bootstrap includes LESS variables and mixins for quickly generating your own simple, semantic layouts.</p>
443
444     <h4>Variables</h4>
445     <p>Variables determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below.</p>
446 {% highlight css %}
447 @grid-columns:              12;
448 @grid-gutter-width:         30px;
449 @grid-float-breakpoint:     768px;
450 {% endhighlight %}
451
452     <h4>Mixins</h4>
453     <p>Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns.</p>
454 {% highlight css %}
455 // Creates a wrapper for a series of columns
456 .make-row(@gutter: @grid-gutter-width) {
457   // Then clear the floated columns
458   .clearfix();
459
460   @media (min-width: @screen-sm-min) {
461     margin-left:  (@gutter / -2);
462     margin-right: (@gutter / -2);
463   }
464
465   // Negative margin nested rows out to align the content of columns
466   .row {
467     margin-left:  (@gutter / -2);
468     margin-right: (@gutter / -2);
469   }
470 }
471
472 // Generate the extra small columns
473 .make-xs-column(@columns; @gutter: @grid-gutter-width) {
474   position: relative;
475   // Prevent columns from collapsing when empty
476   min-height: 1px;
477   // Inner gutter via padding
478   padding-left:  (@gutter / 2);
479   padding-right: (@gutter / 2);
480
481   // Calculate width based on number of columns available
482   @media (min-width: @grid-float-breakpoint) {
483     float: left;
484     width: percentage((@columns / @grid-columns));
485   }
486 }
487
488 // Generate the small columns
489 .make-sm-column(@columns; @gutter: @grid-gutter-width) {
490   position: relative;
491   // Prevent columns from collapsing when empty
492   min-height: 1px;
493   // Inner gutter via padding
494   padding-left:  (@gutter / 2);
495   padding-right: (@gutter / 2);
496
497   // Calculate width based on number of columns available
498   @media (min-width: @screen-sm-min) {
499     float: left;
500     width: percentage((@columns / @grid-columns));
501   }
502 }
503
504 // Generate the small column offsets
505 .make-sm-column-offset(@columns) {
506   @media (min-width: @screen-sm-min) {
507     margin-left: percentage((@columns / @grid-columns));
508   }
509 }
510 .make-sm-column-push(@columns) {
511   @media (min-width: @screen-sm-min) {
512     left: percentage((@columns / @grid-columns));
513   }
514 }
515 .make-sm-column-pull(@columns) {
516   @media (min-width: @screen-sm-min) {
517     right: percentage((@columns / @grid-columns));
518   }
519 }
520
521 // Generate the medium columns
522 .make-md-column(@columns; @gutter: @grid-gutter-width) {
523   position: relative;
524   // Prevent columns from collapsing when empty
525   min-height: 1px;
526   // Inner gutter via padding
527   padding-left:  (@gutter / 2);
528   padding-right: (@gutter / 2);
529
530   // Calculate width based on number of columns available
531   @media (min-width: @screen-md-min) {
532     float: left;
533     width: percentage((@columns / @grid-columns));
534   }
535 }
536
537 // Generate the medium column offsets
538 .make-md-column-offset(@columns) {
539   @media (min-width: @screen-md-min) {
540     margin-left: percentage((@columns / @grid-columns));
541   }
542 }
543 .make-md-column-push(@columns) {
544   @media (min-width: @screen-md-min) {
545     left: percentage((@columns / @grid-columns));
546   }
547 }
548 .make-md-column-pull(@columns) {
549   @media (min-width: @screen-md-min) {
550     right: percentage((@columns / @grid-columns));
551   }
552 }
553
554 // Generate the large columns
555 .make-lg-column(@columns; @gutter: @grid-gutter-width) {
556   position: relative;
557   // Prevent columns from collapsing when empty
558   min-height: 1px;
559   // Inner gutter via padding
560   padding-left:  (@gutter / 2);
561   padding-right: (@gutter / 2);
562
563   // Calculate width based on number of columns available
564   @media (min-width: @screen-lg-min) {
565     float: left;
566     width: percentage((@columns / @grid-columns));
567   }
568 }
569
570 // Generate the large column offsets
571 .make-lg-column-offset(@columns) {
572   @media (min-width: @screen-lg-min) {
573     margin-left: percentage((@columns / @grid-columns));
574   }
575 }
576 .make-lg-column-push(@columns) {
577   @media (min-width: @screen-lg-min) {
578     left: percentage((@columns / @grid-columns));
579   }
580 }
581 .make-lg-column-pull(@columns) {
582   @media (min-width: @screen-lg-min) {
583     right: percentage((@columns / @grid-columns));
584   }
585 }
586 {% endhighlight %}
587
588     <h4>Example usage</h4>
589     <p>You can modify the variables to your own custom values, or just use the mixins with their default values. Here's an example of using the default settings to create a two-column layout with a gap between.</p>
590 {% highlight css %}
591 .wrapper {
592   .make-row();
593 }
594 .content-main {
595   .make-lg-column(8);
596 }
597 .content-secondary {
598   .make-lg-column(3);
599   .make-lg-column-offset(1);
600 }
601 {% endhighlight %}
602 {% highlight html %}
603 <div class="wrapper">
604   <div class="content-main">...</div>
605   <div class="content-secondary">...</div>
606 </div>
607 {% endhighlight %}
608
609   </div>
610
611
612
613
614   <!-- Typography
615   ================================================== -->
616   <div class="bs-docs-section">
617     <div class="page-header">
618       <h1 id="type">Typography</h1>
619     </div>
620
621     <!-- Headings -->
622     <h2 id="type-headings">Headings</h2>
623     <p>All HTML headings, <code>&lt;h1&gt;</code> through <code>&lt;h6&gt;</code>, are available. <code>.h1</code> through <code>.h6</code> classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.</p>
624     <div class="bs-example bs-example-type">
625       <table class="table">
626         <tbody>
627           <tr>
628             <td><h1>h1. Bootstrap heading</h1></td>
629             <td class="info">Semibold 36px</td>
630           </tr>
631           <tr>
632             <td><h2>h2. Bootstrap heading</h2></td>
633             <td class="info">Semibold 30px</td>
634           </tr>
635           <tr>
636             <td><h3>h3. Bootstrap heading</h3></td>
637             <td class="info">Semibold 24px</td>
638           </tr>
639           <tr>
640             <td><h4>h4. Bootstrap heading</h4></td>
641             <td class="info">Semibold 18px</td>
642           </tr>
643           <tr>
644             <td><h5>h5. Bootstrap heading</h5></td>
645             <td class="info">Semibold 14px</td>
646           </tr>
647           <tr>
648             <td><h6>h6. Bootstrap heading</h6></td>
649             <td class="info">Semibold 12px</td>
650           </tr>
651         </tbody>
652       </table>
653     </div>
654 {% highlight html %}
655 <h1>h1. Bootstrap heading</h1>
656 <h2>h2. Bootstrap heading</h2>
657 <h3>h3. Bootstrap heading</h3>
658 <h4>h4. Bootstrap heading</h4>
659 <h5>h5. Bootstrap heading</h5>
660 <h6>h6. Bootstrap heading</h6>
661 {% endhighlight %}
662
663     <p>Create lighter, secondary text in any heading with a generic <code>&lt;small&gt;</code> tag or the <code>.small</code> class.</p>
664     <div class="bs-example bs-example-type">
665       <table class="table">
666         <tbody>
667           <tr>
668             <td><h1>h1. Bootstrap heading <small>Secondary text</small></h1></td>
669           </tr>
670           <tr>
671             <td><h2>h2. Bootstrap heading <small>Secondary text</small></h2></td>
672           </tr>
673           <tr>
674             <td><h3>h3. Bootstrap heading <small>Secondary text</small></h3></td>
675           </tr>
676           <tr>
677             <td><h4>h4. Bootstrap heading <small>Secondary text</small></h4></td>
678           </tr>
679           <tr>
680             <td><h5>h5. Bootstrap heading <small>Secondary text</small></h5></td>
681           </tr>
682           <tr>
683             <td><h6>h6. Bootstrap heading <small>Secondary text</small></h6></td>
684           </tr>
685         </tbody>
686       </table>
687     </div>
688 {% highlight html %}
689 <h1>h1. Bootstrap heading <small>Secondary text</small></h1>
690 <h2>h2. Bootstrap heading <small>Secondary text</small></h2>
691 <h3>h3. Bootstrap heading <small>Secondary text</small></h3>
692 <h4>h4. Bootstrap heading <small>Secondary text</small></h4>
693 <h5>h5. Bootstrap heading <small>Secondary text</small></h5>
694 <h6>h6. Bootstrap heading <small>Secondary text</small></h6>
695 {% endhighlight %}
696
697
698     <!-- Body copy -->
699     <h2 id="type-body-copy">Body copy</h2>
700     <p>Bootstrap's global default <code>font-size</code> is <strong>14px</strong>, with a <code>line-height</code> of <strong>1.428</strong>. This is applied to the <code>&lt;body&gt;</code> and all paragraphs. In addition, <code>&lt;p&gt;</code> (paragraphs) receive a bottom margin of half their computed line-height (10px by default).</p>
701     <div class="bs-example">
702       <p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.</p>
703       <p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.</p>
704       <p>Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
705     </div>
706 {% highlight html %}
707 <p>...</p>
708 {% endhighlight %}
709
710     <!-- Body copy .lead -->
711     <h3>Lead body copy</h3>
712     <p>Make a paragraph stand out by adding <code>.lead</code>.</p>
713     <div class="bs-example">
714       <p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p>
715     </div>
716 {% highlight html %}
717 <p class="lead">...</p>
718 {% endhighlight %}
719
720     <!-- Using LESS -->
721     <h3>Built with Less</h3>
722     <p>The typographic scale is based on two LESS variables in <strong>variables.less</strong>: <code>@font-size-base</code> and <code>@line-height-base</code>. The first is the base font-size used throughout and the second is the base line-height. We use those variables and some simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.</p>
723
724
725     <!-- Emphasis -->
726     <h2 id="type-emphasis">Emphasis</h2>
727     <p>Make use of HTML's default emphasis tags with lightweight styles.</p>
728
729     <h3>Small text</h3>
730     <p>For de-emphasizing inline or blocks of text, use the <code>&lt;small&gt;</code> tag to set text at 85% the size of the parent. Heading elements receive their own <code>font-size</code> for nested <code>&lt;small&gt;</code> elements.</p>
731     <p>You may alternatively use an inline element with <code>.small</code> in place of any <code>&lt;small&gt;</code></p>
732     <div class="bs-example">
733       <p><small>This line of text is meant to be treated as fine print.</small></p>
734     </div>
735 {% highlight html %}
736 <small>This line of text is meant to be treated as fine print.</small>
737 {% endhighlight %}
738
739
740     <h3>Bold</h3>
741     <p>For emphasizing a snippet of text with a heavier font-weight.</p>
742     <div class="bs-example">
743       <p>The following snippet of text is <strong>rendered as bold text</strong>.</p>
744     </div>
745 {% highlight html %}
746 <strong>rendered as bold text</strong>
747 {% endhighlight %}
748
749     <h3>Italics</h3>
750     <p>For emphasizing a snippet of text with italics.</p>
751     <div class="bs-example">
752       <p>The following snippet of text is <em>rendered as italicized text</em>.</p>
753     </div>
754 {% highlight html %}
755 <em>rendered as italicized text</em>
756 {% endhighlight %}
757
758     <div class="bs-callout bs-callout-info">
759       <h4>Alternate elements</h4>
760       <p>Feel free to use <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> in HTML5. <code>&lt;b&gt;</code> is meant to highlight words or phrases without conveying additional importance while <code>&lt;i&gt;</code> is mostly for voice, technical terms, etc.</p>
761     </div>
762
763     <h3>Alignment classes</h3>
764     <p>Easily realign text to components with text alignment classes.</p>
765     <div class="bs-example">
766       <p class="text-left">Left aligned text.</p>
767       <p class="text-center">Center aligned text.</p>
768       <p class="text-right">Right aligned text.</p>
769     </div>
770 {% highlight html %}
771 <p class="text-left">Left aligned text.</p>
772 <p class="text-center">Center aligned text.</p>
773 <p class="text-right">Right aligned text.</p>
774 {% endhighlight %}
775
776     <h3>Emphasis classes</h3>
777     <p>Convey meaning through color with a handful of emphasis utility classes. These may also be applied to links and will darken on hover just like our default link styles.</p>
778     <div class="bs-example">
779       <p class="text-muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>
780       <p class="text-primary">Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
781       <p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
782       <p class="text-info">Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
783       <p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>
784       <p class="text-danger">Donec ullamcorper nulla non metus auctor fringilla.</p>
785     </div>
786 {% highlight html %}
787 <p class="text-muted">...</p>
788 <p class="text-primary">...</p>
789 <p class="text-success">...</p>
790 <p class="text-info">...</p>
791 <p class="text-warning">...</p>
792 <p class="text-danger">...</p>
793 {% endhighlight %}
794     <div class="bs-callout bs-callout-info">
795       <h4>Dealing with specificity</h4>
796       <p>Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <code>&lt;span&gt;</code> with the class.</p>
797     </div>
798
799
800     <!-- Abbreviations -->
801     <h2 id="type-abbreviations">Abbreviations</h2>
802     <p>Stylized implementation of HTML's <code>&lt;abbr&gt;</code> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a <code>title</code> attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.</p>
803
804     <h3>Basic abbreviation</h3>
805     <p>For expanded text on long hover of an abbreviation, include the <code>title</code> attribute with the <code>&lt;abbr&gt;</code> element.</p>
806     <div class="bs-example">
807       <p>An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.</p>
808     </div>
809 {% highlight html %}
810 <abbr title="attribute">attr</abbr>
811 {% endhighlight %}
812
813     <h3>Initialism</h3>
814     <p>Add <code>.initialism</code> to an abbreviation for a slightly smaller font-size.</p>
815     <div class="bs-example">
816       <p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr> is the best thing since sliced bread.</p>
817     </div>
818 {% highlight html %}
819 <abbr title="HyperText Markup Language" class="initialism">HTML</abbr>
820 {% endhighlight %}
821
822
823     <!-- Addresses -->
824     <h2 id="type-addresses">Addresses</h2>
825     <p>Present contact information for the nearest ancestor or the entire body of work. Preserve formatting by ending all lines with <code>&lt;br&gt;</code>.</p>
826     <div class="bs-example">
827       <address>
828         <strong>Twitter, Inc.</strong><br>
829         795 Folsom Ave, Suite 600<br>
830         San Francisco, CA 94107<br>
831         <abbr title="Phone">P:</abbr> (123) 456-7890
832       </address>
833       <address>
834         <strong>Full Name</strong><br>
835         <a href="mailto:#">first.last@example.com</a>
836       </address>
837     </div>
838 {% highlight html %}
839 <address>
840   <strong>Twitter, Inc.</strong><br>
841   795 Folsom Ave, Suite 600<br>
842   San Francisco, CA 94107<br>
843   <abbr title="Phone">P:</abbr> (123) 456-7890
844 </address>
845
846 <address>
847   <strong>Full Name</strong><br>
848   <a href="mailto:#">first.last@example.com</a>
849 </address>
850 {% endhighlight %}
851
852
853     <!-- Blockquotes -->
854     <h2 id="type-blockquotes">Blockquotes</h2>
855     <p>For quoting blocks of content from another source within your document.</p>
856
857     <h3>Default blockquote</h3>
858     <p>Wrap <code>&lt;blockquote&gt;</code> around any <abbr title="HyperText Markup Language">HTML</abbr> as the quote. For straight quotes, we recommend a <code>&lt;p&gt;</code>.</p>
859     <div class="bs-example">
860       <blockquote>
861         <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
862       </blockquote>
863     </div>
864 {% highlight html %}
865 <blockquote>
866   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
867 </blockquote>
868 {% endhighlight %}
869
870     <h3>Blockquote options</h3>
871     <p>Style and content changes for simple variations on a standard <code>&lt;blockquote&gt;</code>.</p>
872
873     <h4>Naming a source</h4>
874     <p>Add <code>&lt;small&gt;</code> tag for identifying the source. Wrap the name of the source work in <code>&lt;cite&gt;</code>.</p>
875     <div class="bs-example">
876       <blockquote>
877         <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
878         <small>Someone famous in <cite title="Source Title">Source Title</cite></small>
879       </blockquote>
880     </div>
881 {% highlight html %}
882 <blockquote>
883   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
884   <small>Someone famous in <cite title="Source Title">Source Title</cite></small>
885 </blockquote>
886 {% endhighlight %}
887
888     <h4>Alternate displays</h4>
889     <p>Use <code>.pull-right</code> for a floated, right-aligned blockquote.</p>
890     <div class="bs-example" style="overflow: hidden;">
891       <blockquote class="pull-right">
892         <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
893         <small>Someone famous in <cite title="Source Title">Source Title</cite></small>
894       </blockquote>
895     </div>
896 {% highlight html %}
897 <blockquote class="pull-right">
898   ...
899 </blockquote>
900 {% endhighlight %}
901
902
903     <!-- Lists -->
904     <h2 id="type-lists">Lists</h2>
905
906     <h3>Unordered</h3>
907     <p>A list of items in which the order does <em>not</em> explicitly matter.</p>
908     <div class="bs-example">
909       <ul>
910         <li>Lorem ipsum dolor sit amet</li>
911         <li>Consectetur adipiscing elit</li>
912         <li>Integer molestie lorem at massa</li>
913         <li>Facilisis in pretium nisl aliquet</li>
914         <li>Nulla volutpat aliquam velit
915           <ul>
916             <li>Phasellus iaculis neque</li>
917             <li>Purus sodales ultricies</li>
918             <li>Vestibulum laoreet porttitor sem</li>
919             <li>Ac tristique libero volutpat at</li>
920           </ul>
921         </li>
922         <li>Faucibus porta lacus fringilla vel</li>
923         <li>Aenean sit amet erat nunc</li>
924         <li>Eget porttitor lorem</li>
925       </ul>
926     </div>
927 {% highlight html %}
928 <ul>
929   <li>...</li>
930 </ul>
931 {% endhighlight %}
932
933     <h3>Ordered</h3>
934     <p>A list of items in which the order <em>does</em> explicitly matter.</p>
935     <div class="bs-example">
936       <ol>
937         <li>Lorem ipsum dolor sit amet</li>
938         <li>Consectetur adipiscing elit</li>
939         <li>Integer molestie lorem at massa</li>
940         <li>Facilisis in pretium nisl aliquet</li>
941         <li>Nulla volutpat aliquam velit</li>
942         <li>Faucibus porta lacus fringilla vel</li>
943         <li>Aenean sit amet erat nunc</li>
944         <li>Eget porttitor lorem</li>
945       </ol>
946     </div>
947 {% highlight html %}
948 <ol>
949   <li>...</li>
950 </ol>
951 {% endhighlight %}
952
953     <h3>Unstyled</h3>
954     <p>Remove the default <code>list-style</code> and left margin on list items (immediate children only). <strong>This only applies to immediate children list items</strong>, meaning you will need to add the class for any nested lists as well.</p>
955     <div class="bs-example">
956       <ul class="list-unstyled">
957         <li>Lorem ipsum dolor sit amet</li>
958         <li>Consectetur adipiscing elit</li>
959         <li>Integer molestie lorem at massa</li>
960         <li>Facilisis in pretium nisl aliquet</li>
961         <li>Nulla volutpat aliquam velit
962           <ul>
963             <li>Phasellus iaculis neque</li>
964             <li>Purus sodales ultricies</li>
965             <li>Vestibulum laoreet porttitor sem</li>
966             <li>Ac tristique libero volutpat at</li>
967           </ul>
968         </li>
969         <li>Faucibus porta lacus fringilla vel</li>
970         <li>Aenean sit amet erat nunc</li>
971         <li>Eget porttitor lorem</li>
972       </ul>
973     </div>
974 {% highlight html %}
975 <ul class="list-unstyled">
976   <li>...</li>
977 </ul>
978 {% endhighlight %}
979
980     <h3>Inline</h3>
981     <p>Place all list items on a single line with <code>display: inline-block;</code> and some light padding.</p>
982     <div class="bs-example">
983       <ul class="list-inline">
984         <li>Lorem ipsum</li>
985         <li>Phasellus iaculis</li>
986         <li>Nulla volutpat</li>
987       </ul>
988     </div>
989 {% highlight html %}
990 <ul class="list-inline">
991   <li>...</li>
992 </ul>
993 {% endhighlight %}
994
995     <h3>Description</h3>
996     <p>A list of terms with their associated descriptions.</p>
997     <div class="bs-example">
998       <dl>
999         <dt>Description lists</dt>
1000         <dd>A description list is perfect for defining terms.</dd>
1001         <dt>Euismod</dt>
1002         <dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
1003         <dd>Donec id elit non mi porta gravida at eget metus.</dd>
1004         <dt>Malesuada porta</dt>
1005         <dd>Etiam porta sem malesuada magna mollis euismod.</dd>
1006       </dl>
1007     </div>
1008 {% highlight html %}
1009 <dl>
1010   <dt>...</dt>
1011   <dd>...</dd>
1012 </dl>
1013 {% endhighlight %}
1014
1015     <h4>Horizontal description</h4>
1016     <p>Make terms and descriptions in <code>&lt;dl&gt;</code> line up side-by-side. Starts off stacked like default <code>&lt;dl&gt;</code>s, but when the navbar expands, so do these.</p>
1017     <div class="bs-example">
1018       <dl class="dl-horizontal">
1019         <dt>Description lists</dt>
1020         <dd>A description list is perfect for defining terms.</dd>
1021         <dt>Euismod</dt>
1022         <dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
1023         <dd>Donec id elit non mi porta gravida at eget metus.</dd>
1024         <dt>Malesuada porta</dt>
1025         <dd>Etiam porta sem malesuada magna mollis euismod.</dd>
1026         <dt>Felis euismod semper eget lacinia</dt>
1027         <dd>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd>
1028       </dl>
1029     </div>
1030 {% highlight html %}
1031 <dl class="dl-horizontal">
1032   <dt>...</dt>
1033   <dd>...</dd>
1034 </dl>
1035 {% endhighlight %}
1036
1037     <div class="bs-callout bs-callout-info">
1038       <h4>Auto-truncating</h4>
1039       <p>Horizontal description lists will truncate terms that are too long to fit in the left column with <code>text-overflow</code>. In narrower viewports, they will change to the default stacked layout.</p>
1040     </div>
1041   </div>
1042
1043
1044   <!-- Code
1045   ================================================== -->
1046   <div class="bs-docs-section">
1047     <div class="page-header">
1048       <h1 id="code">Code</h1>
1049     </div>
1050
1051     <h2>Inline</h2>
1052     <p>Wrap inline snippets of code with <code>&lt;code&gt;</code>.</p>
1053 <div class="bs-example">
1054   For example, <code>&lt;section&gt;</code> should be wrapped as inline.
1055 </div>
1056 {% highlight html %}
1057 For example, <code>&lt;section&gt;</code> should be wrapped as inline.
1058 {% endhighlight %}
1059
1060     <h2>Basic block</h2>
1061     <p>Use <code>&lt;pre&gt;</code> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.</p>
1062 <div class="bs-example">
1063   <pre>&lt;p&gt;Sample text here...&lt;/p&gt;</pre>
1064 </div>
1065 {% highlight html %}
1066 <pre>&lt;p&gt;Sample text here...&lt;/p&gt;</pre>
1067 {% endhighlight %}
1068
1069     <p>You may optionally add the <code>.pre-scrollable</code> class, which will set a max-height of 350px and provide a y-axis scrollbar.</p>
1070   </div>
1071
1072
1073
1074   <!-- Tables
1075   ================================================== -->
1076   <div class="bs-docs-section">
1077     <div class="page-header">
1078       <h1 id="tables">Tables</h1>
1079     </div>
1080
1081     <h2 id="tables-example">Basic example</h2>
1082     <p>For basic styling&mdash;light padding and only horizontal dividers&mdash;add the base class <code>.table</code> to any <code>&lt;table&gt;</code>. It may seem super redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we've opted to isolate our custom table styles.</p>
1083     <div class="bs-example">
1084       <table class="table">
1085         <thead>
1086           <tr>
1087             <th>#</th>
1088             <th>First Name</th>
1089             <th>Last Name</th>
1090             <th>Username</th>
1091           </tr>
1092         </thead>
1093         <tbody>
1094           <tr>
1095             <td>1</td>
1096             <td>Mark</td>
1097             <td>Otto</td>
1098             <td>@mdo</td>
1099           </tr>
1100           <tr>
1101             <td>2</td>
1102             <td>Jacob</td>
1103             <td>Thornton</td>
1104             <td>@fat</td>
1105           </tr>
1106           <tr>
1107             <td>3</td>
1108             <td>Larry</td>
1109             <td>the Bird</td>
1110             <td>@twitter</td>
1111           </tr>
1112         </tbody>
1113       </table>
1114     </div><!-- /example -->
1115 {% highlight html %}
1116 <table class="table">
1117   ...
1118 </table>
1119 {% endhighlight %}
1120
1121
1122     <h2 id="tables-striped">Striped rows</h2>
1123     <p>Use <code>.table-striped</code> to add zebra-striping to any table row within the <code>&lt;tbody&gt;</code>.</p>
1124     <div class="bs-callout bs-callout-danger">
1125       <h4>Cross-browser compatibility</h4>
1126       <p>Striped tables are styled via the <code>:nth-child</code> CSS selector, which is not available in Internet Explorer 8.</p>
1127     </div>
1128     <div class="bs-example">
1129       <table class="table table-striped">
1130         <thead>
1131           <tr>
1132             <th>#</th>
1133             <th>First Name</th>
1134             <th>Last Name</th>
1135             <th>Username</th>
1136           </tr>
1137         </thead>
1138         <tbody>
1139           <tr>
1140             <td>1</td>
1141             <td>Mark</td>
1142             <td>Otto</td>
1143             <td>@mdo</td>
1144           </tr>
1145           <tr>
1146             <td>2</td>
1147             <td>Jacob</td>
1148             <td>Thornton</td>
1149             <td>@fat</td>
1150           </tr>
1151           <tr>
1152             <td>3</td>
1153             <td>Larry</td>
1154             <td>the Bird</td>
1155             <td>@twitter</td>
1156           </tr>
1157         </tbody>
1158       </table>
1159     </div><!-- /example -->
1160 {% highlight html %}
1161 <table class="table table-striped">
1162   ...
1163 </table>
1164 {% endhighlight %}
1165
1166
1167     <h2 id="tables-bordered">Bordered table</h2>
1168     <p>Add <code>.table-bordered</code> for borders on all sides of the table and cells.</p>
1169     <div class="bs-example">
1170       <table class="table table-bordered">
1171         <thead>
1172           <tr>
1173             <th>#</th>
1174             <th>First Name</th>
1175             <th>Last Name</th>
1176             <th>Username</th>
1177           </tr>
1178         </thead>
1179         <tbody>
1180           <tr>
1181             <td rowspan="2">1</td>
1182             <td>Mark</td>
1183             <td>Otto</td>
1184             <td>@mdo</td>
1185           </tr>
1186           <tr>
1187             <td>Mark</td>
1188             <td>Otto</td>
1189             <td>@TwBootstrap</td>
1190           </tr>
1191           <tr>
1192             <td>2</td>
1193             <td>Jacob</td>
1194             <td>Thornton</td>
1195             <td>@fat</td>
1196           </tr>
1197           <tr>
1198             <td>3</td>
1199             <td colspan="2">Larry the Bird</td>
1200             <td>@twitter</td>
1201           </tr>
1202         </tbody>
1203       </table>
1204     </div><!-- /example -->
1205 {% highlight html %}
1206 <table class="table table-bordered">
1207   ...
1208 </table>
1209 {% endhighlight %}
1210
1211
1212     <h2 id="tables-hover-rows">Hover rows</h2>
1213     <p>Add <code>.table-hover</code> to enable a hover state on table rows within a <code>&lt;tbody&gt;</code>.</p>
1214     <div class="bs-example">
1215       <table class="table table-hover">
1216         <thead>
1217           <tr>
1218             <th>#</th>
1219             <th>First Name</th>
1220             <th>Last Name</th>
1221             <th>Username</th>
1222           </tr>
1223         </thead>
1224         <tbody>
1225           <tr>
1226             <td>1</td>
1227             <td>Mark</td>
1228             <td>Otto</td>
1229             <td>@mdo</td>
1230           </tr>
1231           <tr>
1232             <td>2</td>
1233             <td>Jacob</td>
1234             <td>Thornton</td>
1235             <td>@fat</td>
1236           </tr>
1237           <tr>
1238             <td>3</td>
1239             <td colspan="2">Larry the Bird</td>
1240             <td>@twitter</td>
1241           </tr>
1242         </tbody>
1243       </table>
1244     </div><!-- /example -->
1245 {% highlight html %}
1246 <table class="table table-hover">
1247   ...
1248 </table>
1249 {% endhighlight %}
1250
1251
1252     <h2 id="tables-condensed">Condensed table</h2>
1253     <p>Add <code>.table-condensed</code> to make tables more compact by cutting cell padding in half.</p>
1254     <div class="bs-example">
1255       <table class="table table-condensed">
1256         <thead>
1257           <tr>
1258             <th>#</th>
1259             <th>First Name</th>
1260             <th>Last Name</th>
1261             <th>Username</th>
1262           </tr>
1263         </thead>
1264         <tbody>
1265           <tr>
1266             <td>1</td>
1267             <td>Mark</td>
1268             <td>Otto</td>
1269             <td>@mdo</td>
1270           </tr>
1271           <tr>
1272             <td>2</td>
1273             <td>Jacob</td>
1274             <td>Thornton</td>
1275             <td>@fat</td>
1276           </tr>
1277           <tr>
1278             <td>3</td>
1279             <td colspan="2">Larry the Bird</td>
1280             <td>@twitter</td>
1281           </tr>
1282         </tbody>
1283       </table>
1284     </div><!-- /example -->
1285 {% highlight html %}
1286 <table class="table table-condensed">
1287   ...
1288 </table>
1289 {% endhighlight %}
1290
1291
1292     <h2 id="tables-contextual-classes">Contextual classes</h2>
1293     <p>Use contextual classes to color table rows or individual cells.</p>
1294     <div class="table-responsive">
1295       <table class="table table-bordered table-striped">
1296         <colgroup>
1297           <col class="col-xs-1">
1298           <col class="col-xs-7">
1299         </colgroup>
1300         <thead>
1301           <tr>
1302             <th>Class</th>
1303             <th>Description</th>
1304           </tr>
1305         </thead>
1306         <tbody>
1307           <tr>
1308             <td>
1309               <code>.active</code>
1310             </td>
1311             <td>Applies the hover color to a particular row or cell</td>
1312           </tr>
1313           <tr>
1314             <td>
1315               <code>.success</code>
1316             </td>
1317             <td>Indicates a successful or positive action</td>
1318           </tr>
1319           <tr>
1320             <td>
1321               <code>.warning</code>
1322             </td>
1323             <td>Indicates a warning that might need attention</td>
1324           </tr>
1325           <tr>
1326             <td>
1327               <code>.danger</code>
1328             </td>
1329             <td>Indicates a dangerous or potentially negative action</td>
1330           </tr>
1331         </tbody>
1332       </table>
1333     </div>
1334     <div class="bs-example">
1335       <table class="table">
1336         <thead>
1337           <tr>
1338             <th>#</th>
1339             <th>Column heading</th>
1340             <th>Column heading</th>
1341             <th>Column heading</th>
1342           </tr>
1343         </thead>
1344         <tbody>
1345           <tr class="active">
1346             <td>1</td>
1347             <td>Column content</td>
1348             <td>Column content</td>
1349             <td>Column content</td>
1350           </tr>
1351           <tr>
1352             <td>2</td>
1353             <td>Column content</td>
1354             <td>Column content</td>
1355             <td>Column content</td>
1356           </tr>
1357           <tr class="success">
1358             <td>3</td>
1359             <td>Column content</td>
1360             <td>Column content</td>
1361             <td>Column content</td>
1362           </tr>
1363           <tr>
1364             <td>4</td>
1365             <td>Column content</td>
1366             <td>Column content</td>
1367             <td>Column content</td>
1368           </tr>
1369           <tr class="warning">
1370             <td>5</td>
1371             <td>Column content</td>
1372             <td>Column content</td>
1373             <td>Column content</td>
1374           </tr>
1375           <tr>
1376             <td>6</td>
1377             <td>Column content</td>
1378             <td>Column content</td>
1379             <td>Column content</td>
1380           </tr>
1381           <tr class="danger">
1382             <td>7</td>
1383             <td>Column content</td>
1384             <td>Column content</td>
1385             <td>Column content</td>
1386           </tr>
1387         </tbody>
1388       </table>
1389     </div><!-- /example -->
1390 {% highlight html %}
1391 <!-- On rows -->
1392 <tr class="active">...</tr>
1393 <tr class="success">...</tr>
1394 <tr class="warning">...</tr>
1395 <tr class="danger">...</tr>
1396
1397 <!-- On cells (`td` or `th`) -->
1398 <tr>
1399   <td class="active">...</td>
1400   <td class="success">...</td>
1401   <td class="warning">...</td>
1402   <td class="danger">...</td>
1403 </tr>
1404 {% endhighlight %}
1405
1406
1407     <h2 id="tables-responsive">Responsive tables</h2>
1408     <p>Create responsive tables by wrapping any <code>.table</code> in <code>.table-responsive</code> to make them scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.</p>
1409     <div class="bs-example">
1410       <div class="table-responsive">
1411         <table class="table">
1412           <thead>
1413             <tr>
1414               <th>#</th>
1415               <th>Table heading</th>
1416               <th>Table heading</th>
1417               <th>Table heading</th>
1418               <th>Table heading</th>
1419               <th>Table heading</th>
1420               <th>Table heading</th>
1421             </tr>
1422           </thead>
1423           <tbody>
1424             <tr>
1425               <td>1</td>
1426               <td>Table cell</td>
1427               <td>Table cell</td>
1428               <td>Table cell</td>
1429               <td>Table cell</td>
1430               <td>Table cell</td>
1431               <td>Table cell</td>
1432             </tr>
1433             <tr>
1434               <td>2</td>
1435               <td>Table cell</td>
1436               <td>Table cell</td>
1437               <td>Table cell</td>
1438               <td>Table cell</td>
1439               <td>Table cell</td>
1440               <td>Table cell</td>
1441             </tr>
1442             <tr>
1443               <td>3</td>
1444               <td>Table cell</td>
1445               <td>Table cell</td>
1446               <td>Table cell</td>
1447               <td>Table cell</td>
1448               <td>Table cell</td>
1449               <td>Table cell</td>
1450             </tr>
1451           </tbody>
1452         </table>
1453       </div><!-- /.table-responsive -->
1454
1455       <div class="table-responsive">
1456         <table class="table table-bordered">
1457           <thead>
1458             <tr>
1459               <th>#</th>
1460               <th>Table heading</th>
1461               <th>Table heading</th>
1462               <th>Table heading</th>
1463               <th>Table heading</th>
1464               <th>Table heading</th>
1465               <th>Table heading</th>
1466             </tr>
1467           </thead>
1468           <tbody>
1469             <tr>
1470               <td>1</td>
1471               <td>Table cell</td>
1472               <td>Table cell</td>
1473               <td>Table cell</td>
1474               <td>Table cell</td>
1475               <td>Table cell</td>
1476               <td>Table cell</td>
1477             </tr>
1478             <tr>
1479               <td>2</td>
1480               <td>Table cell</td>
1481               <td>Table cell</td>
1482               <td>Table cell</td>
1483               <td>Table cell</td>
1484               <td>Table cell</td>
1485               <td>Table cell</td>
1486             </tr>
1487             <tr>
1488               <td>3</td>
1489               <td>Table cell</td>
1490               <td>Table cell</td>
1491               <td>Table cell</td>
1492               <td>Table cell</td>
1493               <td>Table cell</td>
1494               <td>Table cell</td>
1495             </tr>
1496           </tbody>
1497         </table>
1498       </div><!-- /.table-responsive -->
1499     </div><!-- /example -->
1500 {% highlight html %}
1501 <div class="table-responsive">
1502   <table class="table">
1503     ...
1504   </table>
1505 </div>
1506 {% endhighlight %}
1507
1508   </div>
1509
1510
1511
1512   <!-- Forms
1513   ================================================== -->
1514   <div class="bs-docs-section">
1515     <div class="page-header">
1516       <h1 id="forms">Forms</h1>
1517     </div>
1518
1519     <h2 id="forms-example">Basic example</h2>
1520     <p>Individual form controls automatically receive some global styling. All textual <code>&lt;input&gt;</code>, <code>&lt;textarea&gt;</code>, and <code>&lt;select&gt;</code> elements with <code>.form-control</code> are set to <code>width: 100%;</code> by default. Wrap labels and controls in <code>.form-group</code> for optimum spacing.</p>
1521     <div class="bs-example">
1522       <form role="form">
1523         <div class="form-group">
1524           <label for="exampleInputEmail1">Email address</label>
1525           <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
1526         </div>
1527         <div class="form-group">
1528           <label for="exampleInputPassword1">Password</label>
1529           <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
1530         </div>
1531         <div class="form-group">
1532           <label for="exampleInputFile">File input</label>
1533           <input type="file" id="exampleInputFile">
1534           <p class="help-block">Example block-level help text here.</p>
1535         </div>
1536         <div class="checkbox">
1537           <label>
1538             <input type="checkbox"> Check me out
1539           </label>
1540         </div>
1541         <button type="submit" class="btn btn-default">Submit</button>
1542       </form>
1543     </div><!-- /example -->
1544 {% highlight html %}
1545 <form role="form">
1546   <div class="form-group">
1547     <label for="exampleInputEmail1">Email address</label>
1548     <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
1549   </div>
1550   <div class="form-group">
1551     <label for="exampleInputPassword1">Password</label>
1552     <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
1553   </div>
1554   <div class="form-group">
1555     <label for="exampleInputFile">File input</label>
1556     <input type="file" id="exampleInputFile">
1557     <p class="help-block">Example block-level help text here.</p>
1558   </div>
1559   <div class="checkbox">
1560     <label>
1561       <input type="checkbox"> Check me out
1562     </label>
1563   </div>
1564   <button type="submit" class="btn btn-default">Submit</button>
1565 </form>
1566 {% endhighlight %}
1567
1568
1569     <h2 id="forms-inline">Inline form</h2>
1570     <p>Add <code>.form-inline</code> for left-aligned and inline-block controls for a compact layout.</p>
1571     <div class="bs-callout bs-callout-danger">
1572       <h4>Requires custom widths</h4>
1573       <p>Inputs, selects, and textareas are 100% wide by default in Bootstrap. To use the inline form, you'll have to set a width on the form controls used within.</p>
1574     </div>
1575     <div class="bs-callout bs-callout-danger">
1576       <h4>Always add labels</h4>
1577       <p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the <code>.sr-only</code> class.</p>
1578     </div>
1579     <div class="bs-example">
1580       <form class="form-inline" role="form">
1581         <div class="form-group">
1582           <label class="sr-only" for="exampleInputEmail2">Email address</label>
1583           <input type="email" class="form-control" id="exampleInputEmail2" placeholder="Enter email">
1584         </div>
1585         <div class="form-group">
1586           <label class="sr-only" for="exampleInputPassword2">Password</label>
1587           <input type="password" class="form-control" id="exampleInputPassword2" placeholder="Password">
1588         </div>
1589         <div class="checkbox">
1590           <label>
1591             <input type="checkbox"> Remember me
1592           </label>
1593         </div>
1594         <button type="submit" class="btn btn-default">Sign in</button>
1595       </form>
1596     </div><!-- /example -->
1597 {% highlight html %}
1598 <form class="form-inline" role="form">
1599   <div class="form-group">
1600     <label class="sr-only" for="exampleInputEmail2">Email address</label>
1601     <input type="email" class="form-control" id="exampleInputEmail2" placeholder="Enter email">
1602   </div>
1603   <div class="form-group">
1604     <label class="sr-only" for="exampleInputPassword2">Password</label>
1605     <input type="password" class="form-control" id="exampleInputPassword2" placeholder="Password">
1606   </div>
1607   <div class="checkbox">
1608     <label>
1609       <input type="checkbox"> Remember me
1610     </label>
1611   </div>
1612   <button type="submit" class="btn btn-default">Sign in</button>
1613 </form>
1614 {% endhighlight %}
1615
1616
1617     <h2 id="forms-horizontal">Horizontal form</h2>
1618     <p>Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout by adding <code>.form-horizontal</code> to the form. Doing so changes <code>.form-group</code>s to behave as grid rows, so no need for <code>.row</code>.</p>
1619     <div class="bs-example">
1620       <form class="form-horizontal">
1621         <div class="form-group">
1622           <label for="inputEmail3" class="col-sm-2 control-label">Email</label>
1623           <div class="col-sm-10">
1624             <input type="email" class="form-control" id="inputEmail3" placeholder="Email">
1625           </div>
1626         </div>
1627         <div class="form-group">
1628           <label for="inputPassword3" class="col-sm-2 control-label">Password</label>
1629           <div class="col-sm-10">
1630             <input type="password" class="form-control" id="inputPassword3" placeholder="Password">
1631           </div>
1632         </div>
1633         <div class="form-group">
1634           <div class="col-sm-offset-2 col-sm-10">
1635             <div class="checkbox">
1636               <label>
1637                 <input type="checkbox"> Remember me
1638               </label>
1639             </div>
1640           </div>
1641         </div>
1642         <div class="form-group">
1643           <div class="col-sm-offset-2 col-sm-10">
1644             <button type="submit" class="btn btn-default">Sign in</button>
1645           </div>
1646         </div>
1647       </form>
1648     </div><!-- /.bs-example -->
1649 {% highlight html %}
1650 <form class="form-horizontal" role="form">
1651   <div class="form-group">
1652     <label for="inputEmail3" class="col-sm-2 control-label">Email</label>
1653     <div class="col-sm-10">
1654       <input type="email" class="form-control" id="inputEmail3" placeholder="Email">
1655     </div>
1656   </div>
1657   <div class="form-group">
1658     <label for="inputPassword3" class="col-sm-2 control-label">Password</label>
1659     <div class="col-sm-10">
1660       <input type="password" class="form-control" id="inputPassword3" placeholder="Password">
1661     </div>
1662   </div>
1663   <div class="form-group">
1664     <div class="col-sm-offset-2 col-sm-10">
1665       <div class="checkbox">
1666         <label>
1667           <input type="checkbox"> Remember me
1668         </label>
1669       </div>
1670     </div>
1671   </div>
1672   <div class="form-group">
1673     <div class="col-sm-offset-2 col-sm-10">
1674       <button type="submit" class="btn btn-default">Sign in</button>
1675     </div>
1676   </div>
1677 </form>
1678 {% endhighlight %}
1679
1680
1681     <h2 id="forms-controls">Supported controls</h2>
1682     <p>Examples of standard form controls supported in an example form layout.</p>
1683
1684     <h3>Inputs</h3>
1685     <p>Most common form control, text-based input fields. Includes support for all HTML5 types: <code>text</code>, <code>password</code>, <code>datetime</code>, <code>datetime-local</code>, <code>date</code>, <code>month</code>, <code>time</code>, <code>week</code>, <code>number</code>, <code>email</code>, <code>url</code>, <code>search</code>, <code>tel</code>, and <code>color</code>.</p>
1686     <div class="bs-callout bs-callout-danger">
1687       <h4>Type declaration required</h4>
1688       <p>Inputs will only be fully styled if their <code>type</code> is properly declared.</p>
1689     </div>
1690     <div class="bs-example">
1691       <form role="form">
1692         <input type="text" class="form-control" placeholder="Text input">
1693       </form>
1694     </div><!-- /.bs-example -->
1695 {% highlight html %}
1696 <input type="text" class="form-control" placeholder="Text input">
1697 {% endhighlight %}
1698     <div class="bs-callout bs-callout-info">
1699       <h4>Input groups</h4>
1700       <p>To add integrated text or buttons before and/or after any text-based <code>&lt;input&gt;</code>, <a href="../components/#input-groups">check out the input group component</a>.</p>
1701     </div>
1702
1703     <h3>Textarea</h3>
1704     <p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p>
1705     <div class="bs-example">
1706       <form role="form">
1707         <textarea class="form-control" rows="3"></textarea>
1708       </form>
1709     </div><!-- /.bs-example -->
1710 {% highlight html %}
1711 <textarea class="form-control" rows="3"></textarea>
1712 {% endhighlight %}
1713
1714     <h3>Checkboxes and radios</h3>
1715     <p>Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.</p>
1716     <h4>Default (stacked)</h4>
1717     <div class="bs-example">
1718       <form role="form">
1719         <div class="checkbox">
1720           <label>
1721             <input type="checkbox" value="">
1722             Option one is this and that&mdash;be sure to include why it's great
1723           </label>
1724         </div>
1725         <br>
1726         <div class="radio">
1727           <label>
1728             <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
1729             Option one is this and that&mdash;be sure to include why it's great
1730           </label>
1731         </div>
1732         <div class="radio">
1733           <label>
1734             <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
1735             Option two can be something else and selecting it will deselect option one
1736           </label>
1737         </div>
1738       </form>
1739     </div><!-- /.bs-example -->
1740 {% highlight html %}
1741 <div class="checkbox">
1742   <label>
1743     <input type="checkbox" value="">
1744     Option one is this and that&mdash;be sure to include why it's great
1745   </label>
1746 </div>
1747
1748 <div class="radio">
1749   <label>
1750     <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
1751     Option one is this and that&mdash;be sure to include why it's great
1752   </label>
1753 </div>
1754 <div class="radio">
1755   <label>
1756     <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
1757     Option two can be something else and selecting it will deselect option one
1758   </label>
1759 </div>
1760 {% endhighlight %}
1761
1762     <h4>Inline checkboxes</h4>
1763     <p>Use <code>.checkbox-inline</code> or <code>.radio-inline</code> class to a series of checkboxes or radios for controls appear on the same line.</p>
1764     <div class="bs-example">
1765       <form role="form">
1766         <label class="checkbox-inline">
1767           <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
1768         </label>
1769         <label class="checkbox-inline">
1770           <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
1771         </label>
1772         <label class="checkbox-inline">
1773           <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
1774         </label>
1775       </form>
1776     </div><!-- /.bs-example -->
1777 {% highlight html %}
1778 <label class="checkbox-inline">
1779   <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
1780 </label>
1781 <label class="checkbox-inline">
1782   <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
1783 </label>
1784 <label class="checkbox-inline">
1785   <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
1786 </label>
1787 {% endhighlight %}
1788
1789     <h3>Selects</h3>
1790     <p>Use the default option, or add <code>multiple</code> to show multiple options at once.</p>
1791     <div class="bs-example">
1792       <form role="form">
1793         <select class="form-control">
1794           <option>1</option>
1795           <option>2</option>
1796           <option>3</option>
1797           <option>4</option>
1798           <option>5</option>
1799         </select>
1800         <br>
1801         <select multiple class="form-control">
1802           <option>1</option>
1803           <option>2</option>
1804           <option>3</option>
1805           <option>4</option>
1806           <option>5</option>
1807         </select>
1808       </form>
1809     </div><!-- /.bs-example -->
1810 {% highlight html %}
1811 <select class="form-control">
1812   <option>1</option>
1813   <option>2</option>
1814   <option>3</option>
1815   <option>4</option>
1816   <option>5</option>
1817 </select>
1818
1819 <select multiple class="form-control">
1820   <option>1</option>
1821   <option>2</option>
1822   <option>3</option>
1823   <option>4</option>
1824   <option>5</option>
1825 </select>
1826 {% endhighlight %}
1827
1828
1829     <h2 id="forms-controls-static">Static control</h2>
1830     <p>When you need to place plain text next to a form label within a horizontal form, use the <code>.form-control-static</code> class on a <code>&lt;p&gt;</code>.</p>
1831     <div class="bs-example">
1832       <form class="form-horizontal" role="form">
1833         <div class="form-group">
1834           <label class="col-sm-2 control-label">Email</label>
1835           <div class="col-sm-10">
1836             <p class="form-control-static">email@example.com</p>
1837           </div>
1838         </div>
1839         <div class="form-group">
1840           <label for="inputPassword" class="col-sm-2 control-label">Password</label>
1841           <div class="col-sm-10">
1842             <input type="password" class="form-control" id="inputPassword" placeholder="Password">
1843           </div>
1844         </div>
1845       </form>
1846     </div><!-- /.bs-example -->
1847 {% highlight html %}
1848 <form class="form-horizontal" role="form">
1849   <div class="form-group">
1850     <label class="col-sm-2 control-label">Email</label>
1851     <div class="col-sm-10">
1852       <p class="form-control-static">email@example.com</p>
1853     </div>
1854   </div>
1855   <div class="form-group">
1856     <label for="inputPassword" class="col-sm-2 control-label">Password</label>
1857     <div class="col-sm-10">
1858       <input type="password" class="form-control" id="inputPassword" placeholder="Password">
1859     </div>
1860   </div>
1861 </form>
1862 {% endhighlight %}
1863
1864
1865     <h2 id="forms-control-states">Form states</h2>
1866     <p>Provide feedback to users or visitors with basic feedback states on form controls and labels.</p>
1867
1868     <h3 id="forms-input-focus">Input focus</h3>
1869     <p>We remove the default <code>outline</code> styles on some form controls and apply a <code>box-shadow</code> in its place for <code>:focus</code>.</p>
1870     <div class="bs-example">
1871       <form role="form">
1872         <input class="form-control" id="focusedInput" type="text" value="This is focused...">
1873       </form>
1874     </div>
1875 {% highlight html %}
1876 <input class="form-control" id="focusedInput" type="text" value="This is focused...">
1877 {% endhighlight %}
1878
1879     <h3 id="forms-disabled-inputs">Disabled inputs</h3>
1880     <p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p>
1881     <div class="bs-example">
1882       <form role="form">
1883         <input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>
1884       </form>
1885     </div><!-- /.bs-example -->
1886 {% highlight html %}
1887 <input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
1888 {% endhighlight %}
1889
1890     <h3 id="forms-disabled-fieldsets">Disabled fieldsets</h3>
1891     <p>Add the <code>disabled</code> attribute to a <code>&lt;fieldset&gt;</code> to disable all the controls within the <code>&lt;fieldset&gt;</code> at once.</p>
1892
1893     <div class="bs-callout bs-callout-warning">
1894       <h4>Link functionality of <code>&lt;a&gt;</code> not impacted</h4>
1895       <p>This class will only change the appearance of <code>&lt;a class="btn btn-default"&gt;</code> buttons, not their functionality. Use custom JavaScript to disable links here.</p>
1896     </div>
1897
1898     <div class="bs-callout bs-callout-danger">
1899       <h4>Cross-browser compatibility</h4>
1900       <p>While Bootstrap will apply these styles in all browsers, Internet Explorer 9 and below don't actually support the <code>disabled</code> attribute on a <code>&lt;fieldset&gt;</code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
1901     </div>
1902
1903     <div class="bs-example">
1904       <form role="form">
1905         <fieldset disabled>
1906           <div class="form-group">
1907             <label for="disabledTextInput">Disabled input</label>
1908             <input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input">
1909           </div>
1910           <div class="form-group">
1911             <label for="disabledSelect">Disabled select menu</label>
1912             <select id="disabledSelect" class="form-control">
1913               <option>Disabled select</option>
1914             </select>
1915           </div>
1916           <div class="checkbox">
1917             <label>
1918               <input type="checkbox"> Can't check this
1919             </label>
1920           </div>
1921           <button type="submit" class="btn btn-primary">Submit</button>
1922         </fieldset>
1923       </form>
1924     </div><!-- /.bs-example -->
1925 {% highlight html %}
1926 <form role="form">
1927   <fieldset disabled>
1928     <div class="form-group">
1929       <label for="disabledTextInput">Disabled input</label>
1930       <input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input">
1931     </div>
1932     <div class="form-group">
1933       <label for="disabledSelect">Disabled select menu</label>
1934       <select id="disabledSelect" class="form-control">
1935         <option>Disabled select</option>
1936       </select>
1937     </div>
1938     <div class="checkbox">
1939       <label>
1940         <input type="checkbox"> Can't check this
1941       </label>
1942     </div>
1943     <button type="submit" class="btn btn-primary">Submit</button>
1944   </fieldset>
1945 </form>
1946 {% endhighlight %}
1947
1948     <h3 id="forms-validation">Validation states</h3>
1949     <p>Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add <code>.has-warning</code>, <code>.has-error</code>, or <code>.has-success</code> to the parent element. Any <code>.control-label</code>, <code>.form-control</code>, and <code>.help-block</code> within that element will receive the validation styles.</p>
1950
1951     <div class="bs-example">
1952       <form role="form">
1953         <div class="form-group has-success">
1954           <label class="control-label" for="inputSuccess">Input with success</label>
1955           <input type="text" class="form-control" id="inputSuccess">
1956         </div>
1957         <div class="form-group has-warning">
1958           <label class="control-label" for="inputWarning">Input with warning</label>
1959           <input type="text" class="form-control" id="inputWarning">
1960         </div>
1961         <div class="form-group has-error">
1962           <label class="control-label" for="inputError">Input with error</label>
1963           <input type="text" class="form-control" id="inputError">
1964         </div>
1965       </form>
1966     </div><!-- /.bs-example -->
1967 {% highlight html %}
1968 <div class="form-group has-success">
1969   <label class="control-label" for="inputSuccess">Input with success</label>
1970   <input type="text" class="form-control" id="inputSuccess">
1971 </div>
1972 <div class="form-group has-warning">
1973   <label class="control-label" for="inputWarning">Input with warning</label>
1974   <input type="text" class="form-control" id="inputWarning">
1975 </div>
1976 <div class="form-group has-error">
1977   <label class="control-label" for="inputError">Input with error</label>
1978   <input type="text" class="form-control" id="inputError">
1979 </div>
1980 {% endhighlight %}
1981
1982
1983     <h2 id="forms-control-sizes">Control sizing</h2>
1984     <p>Set heights using classes like <code>.input-lg</code>, and set widths using grid column classes like <code>.col-lg-*</code>.</p>
1985
1986     <h3>Height sizing</h3>
1987     <p>Create larger or smaller form controls that match button sizes.</p>
1988     <div class="bs-example bs-example-control-sizing">
1989       <form role="form">
1990         <div class="controls">
1991           <input class="form-control input-lg" type="text" placeholder=".input-lg">
1992           <input type="text" class="form-control" placeholder="Default input">
1993           <input class="form-control input-sm" type="text" placeholder=".input-sm">
1994
1995           <select class="form-control input-lg">
1996             <option value="">.input-lg</option>
1997           </select>
1998           <select class="form-control">
1999             <option value="">Default select</option>
2000           </select>
2001           <select class="form-control input-sm">
2002             <option value="">.input-sm</option>
2003           </select>
2004         </div>
2005       </form>
2006     </div><!-- /.bs-example -->
2007 {% highlight html %}
2008 <input class="form-control input-lg" type="text" placeholder=".input-lg">
2009 <input class="form-control" type="text" placeholder="Default input">
2010 <input class="form-control input-sm" type="text" placeholder=".input-sm">
2011
2012 <select class="form-control input-lg">...</select>
2013 <select class="form-control">...</select>
2014 <select class="form-control input-sm">...</select>
2015 {% endhighlight %}
2016
2017     <h3>Column sizing</h3>
2018     <p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p>
2019     <div class="bs-example">
2020       <form role="form">
2021         <div class="row">
2022           <div class="col-xs-2">
2023             <input type="text" class="form-control" placeholder=".col-xs-2">
2024           </div>
2025           <div class="col-xs-3">
2026             <input type="text" class="form-control" placeholder=".col-xs-3">
2027           </div>
2028           <div class="col-xs-4">
2029             <input type="text" class="form-control" placeholder=".col-xs-4">
2030           </div>
2031         </div>
2032       </form>
2033     </div><!-- /.bs-example -->
2034 {% highlight html %}
2035 <div class="row">
2036   <div class="col-xs-2">
2037     <input type="text" class="form-control" placeholder=".col-xs-2">
2038   </div>
2039   <div class="col-xs-3">
2040     <input type="text" class="form-control" placeholder=".col-xs-3">
2041   </div>
2042   <div class="col-xs-4">
2043     <input type="text" class="form-control" placeholder=".col-xs-4">
2044   </div>
2045 </div>
2046 {% endhighlight %}
2047
2048     <h2 id="forms-help-text">Help text</h2>
2049     <p>Block level help text for form controls.</p>
2050     <div class="bs-example">
2051       <form role="form">
2052         <input type="text" class="form-control">
2053         <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
2054       </form>
2055     </div><!-- /.bs-example -->
2056 {% highlight html %}
2057 <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
2058 {% endhighlight %}
2059
2060   </div>
2061
2062
2063
2064   <!-- Buttons
2065   ================================================== -->
2066   <div class="bs-docs-section">
2067     <div class="page-header">
2068       <h1 id="buttons">Buttons</h1>
2069     </div>
2070
2071     <h2 id="buttons-options">Options</h2>
2072     <p>Use any of the available button classes to quickly create a styled button.</p>
2073     <div class="bs-example">
2074       <button type="button" class="btn btn-default">Default</button>
2075       <button type="button" class="btn btn-primary">Primary</button>
2076       <button type="button" class="btn btn-success">Success</button>
2077       <button type="button" class="btn btn-info">Info</button>
2078       <button type="button" class="btn btn-warning">Warning</button>
2079       <button type="button" class="btn btn-danger">Danger</button>
2080       <button type="button" class="btn btn-link">Link</button>
2081     </div>
2082 {% highlight html %}
2083 <!-- Standard button -->
2084 <button type="button" class="btn btn-default">Default</button>
2085
2086 <!-- Provides extra visual weight and identifies the primary action in a set of buttons -->
2087 <button type="button" class="btn btn-primary">Primary</button>
2088
2089 <!-- Indicates a successful or positive action -->
2090 <button type="button" class="btn btn-success">Success</button>
2091
2092 <!-- Contextual button for informational alert messages -->
2093 <button type="button" class="btn btn-info">Info</button>
2094
2095 <!-- Indicates caution should be taken with this action -->
2096 <button type="button" class="btn btn-warning">Warning</button>
2097
2098 <!-- Indicates a dangerous or potentially negative action -->
2099 <button type="button" class="btn btn-danger">Danger</button>
2100
2101 <!-- Deemphasize a button by making it look like a link while maintaining button behavior -->
2102 <button type="button" class="btn btn-link">Link</button>
2103 {% endhighlight %}
2104
2105     <h2 id="buttons-sizes">Sizes</h2>
2106     <p>Fancy larger or smaller buttons? Add <code>.btn-lg</code>, <code>.btn-sm</code>, or <code>.btn-xs</code> for additional sizes.</p>
2107     <div class="bs-example">
2108       <p>
2109         <button type="button" class="btn btn-primary btn-lg">Large button</button>
2110         <button type="button" class="btn btn-default btn-lg">Large button</button>
2111       </p>
2112       <p>
2113         <button type="button" class="btn btn-primary">Default button</button>
2114         <button type="button" class="btn btn-default">Default button</button>
2115       </p>
2116       <p>
2117         <button type="button" class="btn btn-primary btn-sm">Small button</button>
2118         <button type="button" class="btn btn-default btn-sm">Small button</button>
2119       </p>
2120       <p>
2121         <button type="button" class="btn btn-primary btn-xs">Extra small button</button>
2122         <button type="button" class="btn btn-default btn-xs">Extra small button</button>
2123       </p>
2124     </div>
2125 {% highlight html %}
2126 <p>
2127   <button type="button" class="btn btn-primary btn-lg">Large button</button>
2128   <button type="button" class="btn btn-default btn-lg">Large button</button>
2129 </p>
2130 <p>
2131   <button type="button" class="btn btn-primary">Default button</button>
2132   <button type="button" class="btn btn-default">Default button</button>
2133 </p>
2134 <p>
2135   <button type="button" class="btn btn-primary btn-sm">Small button</button>
2136   <button type="button" class="btn btn-default btn-sm">Small button</button>
2137 </p>
2138 <p>
2139   <button type="button" class="btn btn-primary btn-xs">Extra small button</button>
2140   <button type="button" class="btn btn-default btn-xs">Extra small button</button>
2141 </p>
2142 {% endhighlight %}
2143
2144     <p>Create block level buttons&mdash;those that span the full width of a parent&mdash; by adding <code>.btn-block</code>.</p>
2145     <div class="bs-example">
2146       <div class="well" style="max-width: 400px; margin: 0 auto 10px;">
2147         <button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button>
2148         <button type="button" class="btn btn-default btn-lg btn-block">Block level button</button>
2149       </div>
2150     </div>
2151 {% highlight html %}
2152 <button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button>
2153 <button type="button" class="btn btn-default btn-lg btn-block">Block level button</button>
2154 {% endhighlight %}
2155
2156
2157     <h2 id="buttons-active">Active state</h2>
2158     <p>Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <code>&lt;button&gt;</code> elements, this is done via <code>:active</code>. For <code>&lt;a&gt;</code> elements, it's done with <code>.active</code>. However, you may use <code>.active</code> <code>&lt;button&gt;</code>s should you need to replicate the active state progammatically.</p>
2159
2160     <h3>Button element</h3>
2161     <p>No need to add <code>:active</code> as it's a pseudo-class, but if you need to force the same appearance, go ahead and add <code>.active</code>.</p>
2162     <p class="bs-example">
2163       <button type="button" class="btn btn-primary btn-lg active">Primary button</button>
2164       <button type="button" class="btn btn-default btn-lg active">Button</button>
2165     </p>
2166 {% highlight html %}
2167 <button type="button" class="btn btn-primary btn-lg active">Primary button</button>
2168 <button type="button" class="btn btn-default btn-lg active">Button</button>
2169 {% endhighlight %}
2170
2171     <h3>Anchor element</h3>
2172     <p>Add the <code>.active</code> class to <code>&lt;a&gt;</code> buttons.</p>
2173     <p class="bs-example">
2174       <a href="#" class="btn btn-primary btn-lg active" role="button">Primary link</a>
2175       <a href="#" class="btn btn-default btn-lg active" role="button">Link</a>
2176     </p>
2177 {% highlight html %}
2178 <a href="#" class="btn btn-primary btn-lg active" role="button">Primary link</a>
2179 <a href="#" class="btn btn-default btn-lg active" role="button">Link</a>
2180 {% endhighlight %}
2181
2182
2183     <h2 id="buttons-disabled">Disabled state</h2>
2184     <p>Make buttons look unclickable by fading them back 50%.</p>
2185
2186     <h3>Button element</h3>
2187     <p>Add the <code>disabled</code> attribute to <code>&lt;button&gt;</code> buttons.</p>
2188     <p class="bs-example">
2189       <button type="button" class="btn btn-primary btn-lg" disabled="disabled">Primary button</button>
2190       <button type="button" class="btn btn-default btn-lg" disabled="disabled">Button</button>
2191     </p>
2192 {% highlight html %}
2193 <button type="button" class="btn btn-lg btn-primary" disabled="disabled">Primary button</button>
2194 <button type="button" class="btn btn-default btn-lg" disabled="disabled">Button</button>
2195 {% endhighlight %}
2196
2197     <div class="bs-callout bs-callout-danger">
2198       <h4>Cross-browser compatibility</h4>
2199       <p>If you add the <code>disabled</code> attribute to a <code>&lt;button&gt;</code>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.</p>
2200     </div>
2201
2202     <h3>Anchor element</h3>
2203     <p>Add the <code>.disabled</code> class to <code>&lt;a&gt;</code> buttons.</p>
2204     <p class="bs-example">
2205       <a href="#" class="btn btn-primary btn-lg disabled" role="button">Primary link</a>
2206       <a href="#" class="btn btn-default btn-lg disabled" role="button">Link</a>
2207     </p>
2208 {% highlight html %}
2209 <a href="#" class="btn btn-primary btn-lg disabled" role="button">Primary link</a>
2210 <a href="#" class="btn btn-default btn-lg disabled" role="button">Link</a>
2211 {% endhighlight %}
2212     <p>
2213       We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required.
2214     </p>
2215     <div class="bs-callout bs-callout-warning">
2216       <h4>Link functionality not impacted</h4>
2217       <p>This class will only change the <code>&lt;a&gt;</code>'s appearance, not its functionality. Use custom JavaScript to disable links here.</p>
2218     </div>
2219     <div class="bs-callout bs-callout-warning">
2220       <h4>Context-specific usage</h4>
2221       <p>While button classes can be used on <code>&lt;a&gt;</code> and <code>&lt;button&gt;</code> elements, only <code>&lt;button&gt;</code> elements are supported within our nav and navbar components.</p>
2222     </div>
2223
2224
2225     <h2 id="buttons-tags">Button tags</h2>
2226     <p>Use the button classes on an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code>, or <code>&lt;input&gt;</code> element.</p>
2227     <form class="bs-example">
2228       <a class="btn btn-default" href="#" role="button">Link</a>
2229       <button class="btn btn-default" type="submit">Button</button>
2230       <input class="btn btn-default" type="button" value="Input">
2231       <input class="btn btn-default" type="submit" value="Submit">
2232     </form>
2233 {% highlight html %}
2234 <a class="btn btn-default" href="#" role="button">Link</a>
2235 <button class="btn btn-default" type="submit">Button</button>
2236 <input class="btn btn-default" type="button" value="Input">
2237 <input class="btn btn-default" type="submit" value="Submit">
2238 {% endhighlight %}
2239
2240     <div class="bs-callout bs-callout-warning">
2241       <h4>Cross-browser rendering</h4>
2242       <p>As a best practice, <strong>we highly recommend using the <code>&lt;button&gt;</code> element whenever possible</strong> to ensure matching cross-browser rendering.</p>
2243       <p>Among other things, there's <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=697451">a Firefox bug</a> that prevents us from setting the <code>line-height</code> of <code>&lt;input&gt;</code>-based buttons, causing them to not exactly match the height of other buttons on Firefox.</p>
2244     </div>
2245
2246   </div>
2247
2248
2249
2250   <!-- Images
2251   ================================================== -->
2252   <div class="bs-docs-section">
2253     <div class="page-header">
2254       <h1 id="images">Images</h1>
2255     </div>
2256
2257     <p>Add classes to an <code>&lt;img&gt;</code> element to easily style images in any project.</p>
2258     <div class="bs-callout bs-callout-danger">
2259       <h4>Cross-browser compatibility</h4>
2260       <p>Keep in mind that Internet Explorer 8 lacks support for rounded corners.</p>
2261     </div>
2262     <div class="bs-example bs-example-images">
2263       <img data-src="holder.js/140x140" class="img-rounded" alt="A generic square placeholder image with rounded corners">
2264       <img data-src="holder.js/140x140" class="img-circle" alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible">
2265       <img data-src="holder.js/140x140" class="img-thumbnail" alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera">
2266     </div>
2267 {% highlight html %}
2268 <img src="..." alt="..." class="img-rounded">
2269 <img src="..." alt="..." class="img-circle">
2270 <img src="..." alt="..." class="img-thumbnail">
2271 {% endhighlight %}
2272
2273     <div class="bs-callout bs-callout-warning">
2274       <h4>Responsive images</h4>
2275       <p>Looking for how to make images more responsive? <a href="../css#overview-responsive-images">Check out the responsive images section</a> up top.</p>
2276     </div>
2277
2278   </div>
2279
2280
2281   <!-- Helpers
2282   ================================================== -->
2283   <div class="bs-docs-section">
2284     <div class="page-header">
2285       <h1 id="helper-classes">Helper classes</h1>
2286     </div>
2287
2288
2289     <h3 id="helper-classes-close">Close icon</h3>
2290     <p>Use the generic close icon for dismissing content like modals and alerts.</p>
2291     <div class="bs-example">
2292       <p><button type="button" class="close" aria-hidden="true">&times;</button></p>
2293     </div>
2294 {% highlight html %}
2295 <button type="button" class="close" aria-hidden="true">&times;</button>
2296 {% endhighlight %}
2297
2298
2299     <h3 id="helper-classes-carets">Carets</h3>
2300     <p>Use carets to indicate dropdown functionality and direction. Note that the default caret will reverse automatically in <a href="../components/#btn-dropdowns-dropup">dropup menus</a>.</p>
2301     <div class="bs-example">
2302       <span class="caret"></span>
2303     </div>
2304 {% highlight html %}
2305 <span class="caret"></span>
2306 {% endhighlight %}
2307
2308
2309     <h3 id="helper-classes-floats">Quick floats</h3>
2310     <p>Float an element to the left or right with a class. <code>!important</code> is included to avoid specificity issues. Classes can also be used as mixins.</p>
2311 {% highlight html %}
2312 <div class="pull-left">...</div>
2313 <div class="pull-right">...</div>
2314 {% endhighlight %}
2315 {% highlight css %}
2316 // Classes
2317 .pull-left {
2318   float: left !important;
2319 }
2320 .pull-right {
2321   float: right !important;
2322 }
2323
2324 // Usage as mixins
2325 .element {
2326   .pull-left();
2327 }
2328 .another-element {
2329   .pull-right();
2330 }
2331 {% endhighlight %}
2332
2333     <div class="bs-callout bs-callout-warning">
2334       <h4>Not for use in navbars</h4>
2335       <p>To align components in navbars with utility classes, use <code>.navbar-left</code> or <code>.navbar-right</code> instead. <a href="../components/#navbar-component-alignment">See the navbar docs</a> for details.</p>
2336     </div>
2337
2338
2339     <h3 id="helper-classes-center">Center content blocks</h3>
2340     <p>Set an element to <code>display: block</code> and center via <code>margin</code>. Available as a mixin and class.</p>
2341 {% highlight html %}
2342 <div class="center-block">...</div>
2343 {% endhighlight %}
2344 {% highlight css %}
2345 // Classes
2346 .center-block {
2347   display: block;
2348   margin-left: auto;
2349   margin-right: auto;
2350 }
2351
2352 // Usage as mixins
2353 .element {
2354   .center-block();
2355 }
2356 {% endhighlight %}
2357
2358
2359
2360     <h3 id="helper-classes-clearfix">Clearfix</h3>
2361     <p>Clear the <code>float</code> on any element with the <code>.clearfix</code> class. Utilizes <a href="http://nicolasgallagher.com/micro-clearfix-hack/">the micro clearfix</a> as popularized by Nicolas Gallagher. Can also be used as a mixin.</p>
2362 {% highlight html %}
2363 <!-- Usage as a class -->
2364 <div class="clearfix">...</div>
2365 {% endhighlight %}
2366 {% highlight css %}
2367 // Mixin itself
2368 .clearfix() {
2369   &:before,
2370   &:after {
2371     content: " ";
2372     display: table;
2373   }
2374   &:after {
2375     clear: both;
2376   }
2377 }
2378
2379 // Usage as a Mixin
2380 .element {
2381   .clearfix();
2382 }
2383 {% endhighlight %}
2384
2385
2386     <h3 id="helper-classes-show-hide">Showing and hiding content</h3>
2387     <p>Force an element to be shown or hidden (<strong>including for screen readers</strong>) with the use of <code>.show</code> and <code>.hidden</code> classes. These classes use <code>!important</code> to avoid specificity conflicts, just like the <a href="../css/#helper-classes-floats">quick floats</a>. They are only available for block level toggling. They can also be used as mixins.</p>
2388     <p><code>.hide</code> is available, but it does not always affect screen readers and is <strong>deprecated</strong> as of v3.0.1. Use <code>.hidden</code> or <code>.sr-only</code> instead.</p>
2389     <p>Furthermore, <code>.invisible</code> can be used to toggle only the visibility of an element, meaning its <code>display</code> is not modified and the element can still affect the flow of the document.</p>
2390 {% highlight html %}
2391 <div class="show">...</div>
2392 <div class="hidden">...</div>
2393 {% endhighlight %}
2394 {% highlight css %}
2395 // Classes
2396 .show {
2397   display: block !important;
2398 }
2399 .hidden {
2400   display: none !important;
2401   visibility: hidden !important;
2402 }
2403 .invisible {
2404   visibility: hidden;
2405 }
2406
2407 // Usage as mixins
2408 .element {
2409   .show();
2410 }
2411 .another-element {
2412   .hidden();
2413 }
2414 {% endhighlight %}
2415
2416
2417     <h3 id="helper-classes-screen-readers">Screen reader content</h3>
2418     <p>Hide an element to all devices <strong>except screen readers</strong> with <code>.sr-only</code>. Necessary for following <a href="{{ page.base_url }}getting-started#accessibility">accessibility best practices</a>. Can also be used as a mixin.</p>
2419 {% highlight html %}
2420 <a class="sr-only" href="#content">Skip to main content</a>
2421 {% endhighlight %}
2422 {% highlight css %}
2423 // Usage as a Mixin
2424 .skip-navigation {
2425   .sr-only();
2426 }
2427 {% endhighlight %}
2428
2429
2430     <h3 id="helper-classes-image-replacement">Image replacement</h3>
2431     <p>Utilize the <code>.text-hide</code> class or mixin to help replace an element's text content with a background image.</p>
2432 {% highlight html %}
2433 <h1 class="text-hide">Custom heading</h1>
2434 {% endhighlight %}
2435   {% highlight css %}
2436 // Usage as a Mixin
2437 .heading {
2438   .text-hide();
2439 }
2440 {% endhighlight %}
2441   </div>
2442
2443
2444
2445   <!-- Responsive utilities
2446   ================================================== -->
2447   <div class="bs-docs-section" id="responsive-utilities">
2448     <div class="page-header">
2449       <h1>Responsive utilities</h1>
2450     </div>
2451     <p class="lead">For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.</p>
2452     <p>Try to use these on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation. <strong>Responsive utilities are currently only available for block and table toggling.</strong> Use with inline and table elements is currently not supported.</p>
2453
2454
2455     <h2 id="responsive-utilities-classes">Available classes</h2>
2456     <p>Use a single or combination of the available classes for toggling content across viewport breakpoints.</p>
2457     <div class="table-responsive">
2458       <table class="table table-bordered table-striped responsive-utilities">
2459         <thead>
2460           <tr>
2461             <th></th>
2462             <th>
2463               Extra small devices
2464               <small>Phones (&lt;768px)</small>
2465             </th>
2466             <th>
2467               Small devices
2468               <small>Tablets (&ge;768px)</small>
2469             </th>
2470             <th>
2471               Medium devices
2472               <small>Desktops (&ge;992px)</small>
2473             </th>
2474             <th>
2475               Large devices
2476               <small>Desktops (&ge;1200px)</small>
2477             </th>
2478           </tr>
2479         </thead>
2480         <tbody>
2481           <tr>
2482             <th><code>.visible-xs</code></th>
2483             <td class="is-visible">Visible</td>
2484             <td class="is-hidden">Hidden</td>
2485             <td class="is-hidden">Hidden</td>
2486             <td class="is-hidden">Hidden</td>
2487           </tr>
2488           <tr>
2489             <th><code>.visible-sm</code></th>
2490             <td class="is-hidden">Hidden</td>
2491             <td class="is-visible">Visible</td>
2492             <td class="is-hidden">Hidden</td>
2493             <td class="is-hidden">Hidden</td>
2494           </tr>
2495           <tr>
2496             <th><code>.visible-md</code></th>
2497             <td class="is-hidden">Hidden</td>
2498             <td class="is-hidden">Hidden</td>
2499             <td class="is-visible">Visible</td>
2500             <td class="is-hidden">Hidden</td>
2501           </tr>
2502           <tr>
2503             <th><code>.visible-lg</code></th>
2504             <td class="is-hidden">Hidden</td>
2505             <td class="is-hidden">Hidden</td>
2506             <td class="is-hidden">Hidden</td>
2507             <td class="is-visible">Visible</td>
2508           </tr>
2509         </tbody>
2510         <tbody>
2511           <tr>
2512             <th><code>.hidden-xs</code></th>
2513             <td class="is-hidden">Hidden</td>
2514             <td class="is-visible">Visible</td>
2515             <td class="is-visible">Visible</td>
2516             <td class="is-visible">Visible</td>
2517           </tr>
2518           <tr>
2519             <th><code>.hidden-sm</code></th>
2520             <td class="is-visible">Visible</td>
2521             <td class="is-hidden">Hidden</td>
2522             <td class="is-visible">Visible</td>
2523             <td class="is-visible">Visible</td>
2524           </tr>
2525           <tr>
2526             <th><code>.hidden-md</code></th>
2527             <td class="is-visible">Visible</td>
2528             <td class="is-visible">Visible</td>
2529             <td class="is-hidden">Hidden</td>
2530             <td class="is-visible">Visible</td>
2531           </tr>
2532           <tr>
2533             <th><code>.hidden-lg</code></th>
2534             <td class="is-visible">Visible</td>
2535             <td class="is-visible">Visible</td>
2536             <td class="is-visible">Visible</td>
2537             <td class="is-hidden">Hidden</td>
2538           </tr>
2539         </tbody>
2540       </table>
2541     </div>
2542
2543
2544     <h2 id="responsive-utilities-print">Print classes</h2>
2545     <p>Similar to the regular responsive classes, use these for toggling content for print.</p>
2546     <div class="table-responsive">
2547       <table class="table table-bordered table-striped responsive-utilities">
2548         <thead>
2549           <tr>
2550             <th>Class</th>
2551             <th>Browser</th>
2552             <th>Print</th>
2553           </tr>
2554         </thead>
2555         <tbody>
2556           <tr>
2557             <th><code>.visible-print</code></th>
2558             <td class="is-hidden">Hidden</td>
2559             <td class="is-visible">Visible</td>
2560           </tr>
2561           <tr>
2562             <th><code>.hidden-print</code></th>
2563             <td class="is-visible">Visible</td>
2564             <td class="is-hidden">Hidden</td>
2565           </tr>
2566         </tbody>
2567       </table>
2568     </div>
2569
2570
2571     <h2 id="responsive-utilities-tests">Test cases</h2>
2572     <p>Resize your browser or load on different devices to test the responsive utility classes.</p>
2573
2574     <h3>Visible on...</h3>
2575     <p>Green checkmarks indicate the element <strong>is visible</strong> in your current viewport.</p>
2576     <div class="row responsive-utilities-test visible-on">
2577       <div class="col-xs-6 col-sm-3">
2578         <span class="hidden-xs">Extra small</span>
2579         <span class="visible-xs">&#10004; Visible on x-small</span>
2580       </div>
2581       <div class="col-xs-6 col-sm-3">
2582         <span class="hidden-sm">Small</span>
2583         <span class="visible-sm">&#10004; Visible on small</span>
2584       </div>
2585       <div class="clearfix visible-xs"></div>
2586       <div class="col-xs-6 col-sm-3">
2587         <span class="hidden-md">Medium</span>
2588         <span class="visible-md">&#10004; Visible on medium</span>
2589       </div>
2590       <div class="col-xs-6 col-sm-3">
2591         <span class="hidden-lg">Large</span>
2592         <span class="visible-lg">&#10004; Visible on large</span>
2593       </div>
2594     </div>
2595     <div class="row responsive-utilities-test visible-on">
2596       <div class="col-xs-6 col-sm-6">
2597         <span class="hidden-xs hidden-sm">Extra small and small</span>
2598         <span class="visible-xs visible-sm">&#10004; Visible on x-small and small</span>
2599       </div>
2600       <div class="col-xs-6 col-sm-6">
2601         <span class="hidden-md hidden-lg">Medium and large</span>
2602         <span class="visible-md visible-lg">&#10004; Visible on medium and large</span>
2603       </div>
2604       <div class="clearfix visible-xs"></div>
2605       <div class="col-xs-6 col-sm-6">
2606         <span class="hidden-xs hidden-md">Extra small and medium</span>
2607         <span class="visible-xs visible-md">&#10004; Visible on x-small and medium</span>
2608       </div>
2609       <div class="col-xs-6 col-sm-6">
2610         <span class="hidden-sm hidden-lg">Small and large</span>
2611         <span class="visible-sm visible-lg">&#10004; Visible on small and large</span>
2612       </div>
2613       <div class="clearfix visible-xs"></div>
2614       <div class="col-xs-6 col-sm-6">
2615         <span class="hidden-xs hidden-lg">Extra small and large</span>
2616         <span class="visible-xs visible-lg">&#10004; Visible on x-small and large</span>
2617       </div>
2618       <div class="col-xs-6 col-sm-6">
2619         <span class="hidden-sm hidden-md">Small and medium</span>
2620         <span class="visible-sm visible-md">&#10004; Visible on small and medium</span>
2621       </div>
2622     </div>
2623
2624     <h3>Hidden on...</h3>
2625     <p>Here, green checkmarks also indicate the element <strong>is hidden</strong> in your current viewport.</p>
2626     <div class="row responsive-utilities-test hidden-on">
2627       <div class="col-xs-6 col-sm-3">
2628         <span class="hidden-xs">Extra small</span>
2629         <span class="visible-xs">&#10004; Hidden on x-small</span>
2630       </div>
2631       <div class="col-xs-6 col-sm-3">
2632         <span class="hidden-sm">Small</span>
2633         <span class="visible-sm">&#10004; Hidden on small</span>
2634       </div>
2635       <div class="clearfix visible-xs"></div>
2636       <div class="col-xs-6 col-sm-3">
2637         <span class="hidden-md">Medium</span>
2638         <span class="visible-md">&#10004; Hidden on medium</span>
2639       </div>
2640       <div class="col-xs-6 col-sm-3">
2641         <span class="hidden-lg">Large</span>
2642         <span class="visible-lg">&#10004; Hidden on large</span>
2643       </div>
2644     </div>
2645     <div class="row responsive-utilities-test hidden-on">
2646       <div class="col-xs-6 col-sm-6">
2647         <span class="hidden-xs hidden-sm">Extra small and small</span>
2648         <span class="visible-xs visible-sm">&#10004; Hidden on x-small and small</span>
2649       </div>
2650       <div class="col-xs-6 col-sm-6">
2651         <span class="hidden-md hidden-lg">Medium and large</span>
2652         <span class="visible-md visible-lg">&#10004; Hidden on medium and large</span>
2653       </div>
2654       <div class="clearfix visible-xs"></div>
2655       <div class="col-xs-6 col-sm-6">
2656         <span class="hidden-xs hidden-md">Extra small and medium</span>
2657         <span class="visible-xs visible-md">&#10004; Hidden on x-small and medium</span>
2658       </div>
2659       <div class="col-xs-6 col-sm-6">
2660         <span class="hidden-sm hidden-lg">Small and large</span>
2661         <span class="visible-sm visible-lg">&#10004; Hidden on small and large</span>
2662       </div>
2663       <div class="clearfix visible-xs"></div>
2664       <div class="col-xs-6 col-sm-6">
2665         <span class="hidden-xs hidden-lg">Extra small and large</span>
2666         <span class="visible-xs visible-lg">&#10004; Hidden on x-small and large</span>
2667       </div>
2668       <div class="col-xs-6 col-sm-6">
2669         <span class="hidden-sm hidden-md">Small and medium</span>
2670         <span class="visible-sm visible-md">&#10004; Hidden on small and medium</span>
2671       </div>
2672     </div>
2673
2674   </div>