update bootstrap to 3.0.0-rc2
[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>Remove <code>margin</code> on the body</li>
48       <li>Set <code>background-color: white;</code> on the <code>body</code></li>
49       <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>
50       <li>Set the global link color via <code>@link-color</code> and apply link underlines only on <code>:hover</code></li>
51     </ul>
52     <p>These styles can be found within <code>scaffolding.less</code>.</p>
53
54     <h3 id="overview-normalize">Normalize</h3>
55     <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>
56
57     <h3 id="overview-container">Containers</h3>
58     <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>
59 {% highlight html %}
60 <div class="container">
61   ...
62 </div>
63 {% endhighlight %}
64   </div>
65
66
67
68   <!-- Glyphicons icon font
69   ================================================== -->
70   <div class="bs-docs-section">
71     <div class="page-header">
72       <h1 id="glyphicons">Glyphicons</h1>
73     </div>
74     <p class="lead">With the launch of Bootstrap 3, icons have been moved to a <a href="https://github.com/twbs/bootstrap-glyphicons">separate repository</a>. This keeps the primary project as lean as possible, makes it easier for folks to swap icon libraries, and makes Glyphicons icon fonts more readily available to more people outside Bootstrap.</p>
75     <p class="lead">
76       <a href="http://glyphicons.getbootstrap.com/" class="btn btn-default btn-lg">Visit Glyphicons for Bootstrap</a> or <a href="https://github.com/twbs/bootstrap-glyphicons">download from GitHub</a>
77     </p>
78   </div>
79
80
81
82   <!-- Grid system
83   ================================================== -->
84   <div class="bs-docs-section">
85     <div class="page-header">
86       <h1 id="grid">Grid system</h1>
87     </div>
88     <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>
89
90     <h3 id="grid-media-queries">Media queries</h3>
91     <p>We use the following media queries to create the key breakpoints in our grid system.</p>
92 {% highlight css %}
93 /* Extra small devices (phones, up to 480px) */
94 /* No media query since this is the default in Bootstrap */
95
96 /* Small devices (tablets, 768px and up) */
97 @media (min-width: @screen-tablet) { ... }
98
99 /* Medium devices (desktops, 992px and up) */
100 @media (min-width: @screen-desktop) { ... }
101
102 /* Large devices (large desktops, 1200px and up) */
103 @media (min-width: @screen-large-desktop) { ... }
104 {% endhighlight %}
105     <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>
106 {% highlight css %}
107 @media (max-width: @screen-phone-max) { ... }
108 @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) { ... }
109 @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) { ... }
110 @media (min-width: @screen-large-desktop) { ... }
111 {% endhighlight %}
112
113     <h3 id="grid-options">Grid options</h3>
114     <p>See how aspects of the Bootstrap grid system work across multiple devices with a handy table.</p>
115     <div class="bs-table-scrollable">
116       <table class="table table-bordered table-striped bs-table">
117         <thead>
118           <tr>
119             <th></th>
120             <th>
121               Extra small devices
122               <small>Phones (&lt;768px)</small>
123             </th>
124             <th>
125               Small devices
126               <small>Tablets (&ge;768px)</small>
127             </th>
128             <th>
129               Medium devices
130               <small>Desktops (&ge;992px)</small>
131             </th>
132             <th>
133               Large devices
134               <small>Desktops (&ge;1200px)</small>
135             </th>
136           </tr>
137         </thead>
138         <tbody>
139           <tr>
140             <th>Grid behavior</th>
141             <td>Horizontal at all times</td>
142             <td colspan="3">Collapsed to start, horizontal above breakpoints</td>
143           </tr>
144           <tr>
145             <th>Max container width</th>
146             <td>None (auto)</td>
147             <td>720px</td>
148             <td>940px</td>
149             <td>1140px</td>
150           </tr>
151           <tr>
152             <th>Class prefix</th>
153             <td><code>.col-xs-</code></td>
154             <td><code>.col-sm-</code></td>
155             <td><code>.col-md-</code></td>
156             <td><code>.col-lg-</code></td>
157           </tr>
158           <tr>
159             <th># of columns</th>
160             <td colspan="4">12</td>
161           </tr>
162           <tr>
163             <th>Max column width</th>
164             <td class="text-muted">Auto</td>
165             <td>60px</td>
166             <td>78px</td>
167             <td>95px</td>
168           </tr>
169           <tr>
170             <th>Gutter width</th>
171             <td colspan="4">30px (15px on each side of a column)</td>
172           </tr>
173           <tr>
174             <th>Nestable</th>
175             <td colspan="4">Yes</td>
176           </tr>
177           <tr>
178             <th>Offsets</th>
179             <td colspan="1" class="text-muted">N/A</td>
180             <td colspan="3">Yes</td>
181           </tr>
182           <tr>
183             <th>Column ordering</th>
184             <td class="text-muted">N/A</td>
185             <td colspan="3">Yes</td>
186           </tr>
187         </tbody>
188       </table>
189     </div>
190
191     <h3 id="grid-example-basic">Example: Stacked-to-horizontal</h3>
192     <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.</p>
193     <div class="bs-docs-grid">
194       <div class="row show-grid">
195         <div class="col-md-1">1</div>
196         <div class="col-md-1">1</div>
197         <div class="col-md-1">1</div>
198         <div class="col-md-1">1</div>
199         <div class="col-md-1">1</div>
200         <div class="col-md-1">1</div>
201         <div class="col-md-1">1</div>
202         <div class="col-md-1">1</div>
203         <div class="col-md-1">1</div>
204         <div class="col-md-1">1</div>
205         <div class="col-md-1">1</div>
206         <div class="col-md-1">1</div>
207       </div>
208       <div class="row show-grid">
209         <div class="col-md-8">8</div>
210         <div class="col-md-4">4</div>
211       </div>
212       <div class="row show-grid">
213         <div class="col-md-4">4</div>
214         <div class="col-md-4">4</div>
215         <div class="col-md-4">4</div>
216       </div>
217       <div class="row show-grid">
218         <div class="col-md-6">6</div>
219         <div class="col-md-6">6</div>
220       </div>
221     </div>
222 {% highlight html %}
223 <div class="row">
224   <div class="col-md-1">1</div>
225   <div class="col-md-1">1</div>
226   <div class="col-md-1">1</div>
227   <div class="col-md-1">1</div>
228   <div class="col-md-1">1</div>
229   <div class="col-md-1">1</div>
230   <div class="col-md-1">1</div>
231   <div class="col-md-1">1</div>
232   <div class="col-md-1">1</div>
233   <div class="col-md-1">1</div>
234   <div class="col-md-1">1</div>
235   <div class="col-md-1">1</div>
236 </div>
237 <div class="row">
238   <div class="col-md-8">8</div>
239   <div class="col-md-4">4</div>
240 </div>
241 <div class="row">
242   <div class="col-md-4">4</div>
243   <div class="col-md-4">4</div>
244   <div class="col-md-4">4</div>
245 </div>
246 <div class="row">
247   <div class="col-md-6">6</div>
248   <div class="col-md-6">6</div>
249 </div>
250 {% endhighlight %}
251
252     <h3 id="grid-example-mixed">Example: Mobile and desktop</h3>
253     <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>
254     <div class="bs-docs-grid">
255       <div class="row show-grid">
256         <div class="col-xs-12 col-md-8">8</div>
257         <div class="col-xs-6 col-md-4">4</div>
258       </div>
259       <div class="row show-grid">
260         <div class="col-xs-6 col-md-4">4</div>
261         <div class="col-xs-6 col-md-4">4</div>
262         <div class="col-xs-6 col-md-4">4</div>
263       </div>
264       <div class="row show-grid">
265         <div class="col-xs-6 col-md-6">6</div>
266         <div class="col-xs-6 col-md-6">6</div>
267       </div>
268     </div>
269 {% highlight html %}
270 <!-- Stack the columns on mobile by making one full-width and the other half-width -->
271 <div class="row">
272   <div class="col-xs-12 col-md-8">8</div>
273   <div class="col-xs-6 col-md-4">4</div>
274 </div>
275
276 <!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
277 <div class="row">
278   <div class="col-xs-6 col-md-4">4</div>
279   <div class="col-xs-6 col-md-4">4</div>
280   <div class="col-xs-6 col-md-4">4</div>
281 </div>
282
283 <!-- Columns are always 50% wide, on mobile and desktop -->
284 <div class="row">
285   <div class="col-xs-6 col-md-6">6</div>
286   <div class="col-xs-6 col-md-6">6</div>
287 </div>
288 {% endhighlight %}
289
290     <h3 id="grid-example-mixed-complete">Example: Mobile, tablet, desktops</h3>
291     <p>Build on the previous example by creating even more dynamic and powerful layouts with tablet <code>.col-sm-*</code> classes.</p>
292     <div class="bs-docs-grid">
293       <div class="row show-grid">
294         <div class="col-xs-12 col-sm-6 col-md-8">.col-xs-12 .col-sm-6 .col-md-8</div>
295         <div class="col-xs-6 col-sm-6 col-md-4">.col-xs-6 .col-sm-6 .col-md-4</div>
296       </div>
297       <div class="row show-grid">
298         <div class="col-xs-6 col-sm-4 col-md-4">.col-xs-6 .col-sm-4 .col-md-4</div>
299         <div class="col-xs-6 col-sm-4 col-md-4">.col-xs-6 .col-sm-4 .col-md-4</div>
300         <!-- Optional: clear the XS cols if their content doesn't match in height -->
301         <div class="clearfix visible-xs"></div>
302         <div class="col-xs-6 col-sm-4 col-md-4">.col-xs-6 .col-sm-4 .col-md-4</div>
303       </div>
304     </div>
305 {% highlight html %}
306 <div class="row">
307   <div class="col-xs-12 col-sm-6 col-md-8">.col-xs-12 .col-sm-6 .col-md-8</div>
308   <div class="col-xs-6 col-sm-6 col-md-4">.col-xs-6 .col-sm-6 .col-md-4</div>
309 </div>
310 <div class="row">
311   <div class="col-xs-6 col-sm-4 col-md-4">.col-xs-6 .col-sm-4 .col-md-4</div>
312   <div class="col-xs-6 col-sm-4 col-md-4">.col-xs-6 .col-sm-4 .col-md-4</div>
313   <!-- Optional: clear the XS cols if their content doesn't match in height -->
314   <div class="clearfix visible-xs"></div>
315   <div class="col-xs-6 col-sm-4 col-md-4">.col-xs-6 .col-sm-4 .col-md-4</div>
316 </div>
317 {% endhighlight %}
318
319     <h3 id="grid-responsive-resets">Responsive column resets</h3>
320     <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>
321 {% highlight html %}
322 <div class="row">
323   <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
324   <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
325
326   <!-- Add the extra clearfix for only the required viewport -->
327   <div class="clearfix visible-xs"></div>
328
329   <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
330   <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
331 </div>
332 {% endhighlight %}
333     <p>In addition to column clearing at responsive breakpoints, you may need to <strong>reset offsets, pushes, or pulls</strong>. Those resets are available for medium and large grid tiers only, since they start only at the (second) small grid tier.</p>
334 {% highlight html %}
335 <div class="row">
336   <div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div>
337   <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>
338 </div>
339
340 <div class="row">
341   <div class="col-sm-6 col-md-5 col-lg-6">.col-sm-6 .col-md-5 .col-lg-6</div>
342   <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>
343 </div>
344 {% endhighlight %}
345
346
347     <h3 id="grid-offsetting">Offsetting columns</h3>
348     <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>
349     <div class="bs-docs-grid">
350       <div class="row show-grid">
351         <div class="col-md-4">4</div>
352         <div class="col-md-4 col-md-offset-4">4 offset 4</div>
353       </div><!-- /row -->
354       <div class="row show-grid">
355         <div class="col-md-3 col-md-offset-3">3 offset 3</div>
356         <div class="col-md-3 col-md-offset-3">3 offset 3</div>
357       </div><!-- /row -->
358       <div class="row show-grid">
359         <div class="col-md-6 col-md-offset-3">6 offset 3</div>
360       </div><!-- /row -->
361     </div>
362 {% highlight html %}
363 <div class="row">
364   <div class="col-md-4">...</div>
365   <div class="col-md-4 col-md-offset-4">...</div>
366 </div>
367 <div class="row">
368   <div class="col-md-3 col-md-offset-3">3 offset 3</div>
369   <div class="col-md-3 col-md-offset-3">3 offset 3</div>
370 </div>
371 <div class="row">
372   <div class="col-md-6 col-md-offset-3">...</div>
373 </div>
374 {% endhighlight %}
375
376
377     <h3 id="grid-nesting">Nesting columns</h3>
378     <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>
379     <div class="row show-grid">
380       <div class="col-md-9">
381         Level 1: 9 columns
382         <div class="row show-grid">
383           <div class="col-md-6">
384             Level 2: 6 columns
385           </div>
386           <div class="col-md-6">
387             Level 2: 6 columns
388           </div>
389         </div>
390       </div>
391     </div>
392 {% highlight html %}
393 <div class="row">
394   <div class="col-md-9">
395     Level 1: 9 columns
396     <div class="row">
397       <div class="col-md-6">
398         Level 2: 6 columns
399       </div>
400       <div class="col-md-6">
401         Level 2: 6 columns
402       </div>
403     </div>
404   </div>
405 </div>
406 {% endhighlight %}
407
408     <h3 id="grid-column-ordering">Column ordering</h3>
409     <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>
410     <div class="row show-grid">
411       <div class="col-md-9 col-md-push-3">9</div>
412       <div class="col-md-3 col-md-pull-9">3</div>
413     </div>
414
415 {% highlight html %}
416 <div class="row">
417   <div class="col-md-9 col-md-push-3">9</div>
418   <div class="col-md-3 col-md-pull-9">3</div>
419 </div>
420 {% endhighlight %}
421
422     <h3 id="grid-less">LESS mixins and variables</h3>
423     <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>
424
425     <h4>Variables</h4>
426     <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>
427 {% highlight css %}
428 @grid-columns:              12;
429 @grid-gutter-width:         30px;
430 @grid-float-breakpoint:     768px;
431 {% endhighlight %}
432
433     <h4>Mixins</h4>
434     <p>Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns.</p>
435 {% highlight css %}
436 // Creates a wrapper for a series of columns
437 .make-row(@gutter: @grid-gutter-width) {
438   // Then clear the floated columns
439   .clearfix();
440
441   @media (min-width: @screen-small) {
442     margin-left:  (@gutter / -2);
443     margin-right: (@gutter / -2);
444   }
445
446   // Negative margin nested rows out to align the content of columns
447   .row {
448     margin-left:  (@gutter / -2);
449     margin-right: (@gutter / -2);
450   }
451 }
452
453 // Generate the extra small columns
454 .make-xs-column(@columns; @gutter: @grid-gutter-width) {
455   position: relative;
456   // Prevent columns from collapsing when empty
457   min-height: 1px;
458   // Inner gutter via padding
459   padding-left:  (@gutter / 2);
460   padding-right: (@gutter / 2);
461
462   // Calculate width based on number of columns available
463   @media (min-width: @grid-float-breakpoint) {
464     float: left;
465     width: percentage((@columns / @grid-columns));
466   }
467 }
468
469 // Generate the small columns
470 .make-sm-column(@columns; @gutter: @grid-gutter-width) {
471   position: relative;
472   // Prevent columns from collapsing when empty
473   min-height: 1px;
474   // Inner gutter via padding
475   padding-left:  (@gutter / 2);
476   padding-right: (@gutter / 2);
477
478   // Calculate width based on number of columns available
479   @media (min-width: @screen-small) {
480     float: left;
481     width: percentage((@columns / @grid-columns));
482   }
483 }
484
485 // Generate the small column offsets
486 .make-sm-column-offset(@columns) {
487   @media (min-width: @screen-small) {
488     margin-left: percentage((@columns / @grid-columns));
489   }
490 }
491 .make-sm-column-push(@columns) {
492   @media (min-width: @screen-small) {
493     left: percentage((@columns / @grid-columns));
494   }
495 }
496 .make-sm-column-pull(@columns) {
497   @media (min-width: @screen-small) {
498     right: percentage((@columns / @grid-columns));
499   }
500 }
501
502 // Generate the medium columns
503 .make-md-column(@columns; @gutter: @grid-gutter-width) {
504   position: relative;
505   // Prevent columns from collapsing when empty
506   min-height: 1px;
507   // Inner gutter via padding
508   padding-left:  (@gutter / 2);
509   padding-right: (@gutter / 2);
510
511   // Calculate width based on number of columns available
512   @media (min-width: @screen-medium) {
513     float: left;
514     width: percentage((@columns / @grid-columns));
515   }
516 }
517
518 // Generate the large column offsets
519 .make-md-column-offset(@columns) {
520   @media (min-width: @screen-medium) {
521     margin-left: percentage((@columns / @grid-columns));
522   }
523 }
524 .make-md-column-push(@columns) {
525   @media (min-width: @screen-medium) {
526     left: percentage((@columns / @grid-columns));
527   }
528 }
529 .make-md-column-pull(@columns) {
530   @media (min-width: @screen-medium) {
531     right: percentage((@columns / @grid-columns));
532   }
533 }
534
535 // Generate the large columns
536 .make-lg-column(@columns; @gutter: @grid-gutter-width) {
537   position: relative;
538   // Prevent columns from collapsing when empty
539   min-height: 1px;
540   // Inner gutter via padding
541   padding-left:  (@gutter / 2);
542   padding-right: (@gutter / 2);
543
544   // Calculate width based on number of columns available
545   @media (min-width: @screen-large) {
546     float: left;
547     width: percentage((@columns / @grid-columns));
548   }
549 }
550
551 // Generate the large column offsets
552 .make-lg-column-offset(@columns) {
553   @media (min-width: @screen-large) {
554     margin-left: percentage((@columns / @grid-columns));
555   }
556 }
557 .make-lg-column-push(@columns) {
558   @media (min-width: @screen-large) {
559     left: percentage((@columns / @grid-columns));
560   }
561 }
562 .make-lg-column-pull(@columns) {
563   @media (min-width: @screen-large) {
564     right: percentage((@columns / @grid-columns));
565   }
566 }
567 {% endhighlight %}
568
569     <h4>Example usage</h4>
570     <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>
571 {% highlight css %}
572 .wrapper {
573   .make-row();
574 }
575 .content-main {
576   .make-lg-column(8);
577 }
578 .content-secondary {
579   .make-lg-column(3);
580   .make-lg-column-offset(1);
581 }
582 {% endhighlight %}
583 {% highlight html %}
584 <div class="wrapper">
585   <div class="content-main">...</div>
586   <div class="content-secondary">...</div>
587 </div>
588 {% endhighlight %}
589
590   </div>
591
592
593
594
595   <!-- Typography
596   ================================================== -->
597   <div class="bs-docs-section">
598     <div class="page-header">
599       <h1 id="type">Typography</h1>
600     </div>
601
602     <!-- Headings -->
603     <h2 id="type-headings">Headings</h2>
604     <p>All HTML headings, <code>&lt;h1&gt;</code> through <code>&lt;h6&gt;</code> are available.</p>
605
606     <div class="bs-example bs-example-type">
607       <table class="table">
608         <tbody>
609           <tr>
610             <td><h1>Bootstrap heading</h1></td>
611             <td>Semibold 38px</td>
612           </tr>
613           <tr>
614             <td><h2>Bootstrap heading</h2></td>
615             <td>Semibold 32px</td>
616           </tr>
617           <tr>
618             <td><h3>Bootstrap heading</h3></td>
619             <td>Semibold 24px</td>
620           </tr>
621           <tr>
622             <td><h4>Bootstrap heading</h4></td>
623             <td>Semibold 18px</td>
624           </tr>
625           <tr>
626             <td><h5>Bootstrap heading</h5></td>
627             <td>Semibold 14px</td>
628           </tr>
629           <tr>
630             <td><h6>Bootstrap heading</h6></td>
631             <td>Semibold 12px</td>
632           </tr>
633         </tbody>
634       </table>
635     </div>
636 {% highlight html %}
637 <h1>...</h1>
638 <h2>...</h2>
639 <h3>...</h3>
640 <h4>...</h4>
641 <h5>...</h5>
642 <h6>...</h6>
643 {% endhighlight %}
644
645     <!-- Body copy -->
646     <h2 id="type-body-copy">Body copy</h2>
647     <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>
648     <div class="bs-example">
649       <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>
650       <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>
651       <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>
652     </div>
653 {% highlight html %}
654 <p>...</p>
655 {% endhighlight %}
656
657     <!-- Body copy .lead -->
658     <h3>Lead body copy</h3>
659     <p>Make a paragraph stand out by adding <code>.lead</code>.</p>
660     <div class="bs-example">
661       <p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p>
662     </div>
663 {% highlight html %}
664 <p class="lead">...</p>
665 {% endhighlight %}
666
667     <!-- Using LESS -->
668     <h3>Built with Less</h3>
669     <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>
670
671
672     <!-- Emphasis -->
673     <h2 id="type-emphasis">Emphasis</h2>
674     <p>Make use of HTML's default emphasis tags with lightweight styles.</p>
675
676     <h3>Small text</h3>
677     <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>
678     <div class="bs-example">
679       <p><small>This line of text is meant to be treated as fine print.</small></p>
680     </div>
681 {% highlight html %}
682 <small>This line of text is meant to be treated as fine print.</small>
683 {% endhighlight %}
684
685
686     <h3>Bold</h3>
687     <p>For emphasizing a snippet of text with a heavier font-weight.</p>
688     <div class="bs-example">
689       <p>The following snippet of text is <strong>rendered as bold text</strong>.</p>
690     </div>
691 {% highlight html %}
692 <strong>rendered as bold text</strong>
693 {% endhighlight %}
694
695     <h3>Italics</h3>
696     <p>For emphasizing a snippet of text with italics.</p>
697     <div class="bs-example">
698       <p>The following snippet of text is <em>rendered as italicized text</em>.</p>
699     </div>
700 {% highlight html %}
701 <em>rendered as italicized text</em>
702 {% endhighlight %}
703
704     <div class="bs-callout bs-callout-info">
705       <h4>Alternate elements</h4>
706       <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>
707     </div>
708
709     <h3>Alignment classes</h3>
710     <p>Easily realign text to components with text alignment classes.</p>
711     <div class="bs-example">
712       <p class="text-left">Left aligned text.</p>
713       <p class="text-center">Center aligned text.</p>
714       <p class="text-right">Right aligned text.</p>
715     </div>
716 {% highlight html %}
717 <p class="text-left">Left aligned text.</p>
718 <p class="text-center">Center aligned text.</p>
719 <p class="text-right">Right aligned text.</p>
720 {% endhighlight %}
721
722     <h3>Emphasis classes</h3>
723     <p>Convey meaning through color with a handful of emphasis utility classes.</p>
724     <div class="bs-example">
725       <p class="text-muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p>
726       <p class="text-primary">Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
727       <p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
728       <p class="text-info">Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
729       <p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p>
730       <p class="text-danger">Donec ullamcorper nulla non metus auctor fringilla.</p>
731     </div>
732 {% highlight html %}
733 <p class="text-muted">...</p>
734 <p class="text-primary">...</p>
735 <p class="text-success">...</p>
736 <p class="text-info">...</p>
737 <p class="text-warning">...</p>
738 <p class="text-danger">...</p>
739 {% endhighlight %}
740
741
742     <!-- Abbreviations -->
743     <h2 id="type-abbreviations">Abbreviations</h2>
744     <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>
745
746     <h3>Basic abbreviation</h3>
747     <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>
748     <div class="bs-example">
749       <p>An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.</p>
750     </div>
751 {% highlight html %}
752 <abbr title="attribute">attr</abbr>
753 {% endhighlight %}
754
755     <h3>Initialism</h3>
756     <p>Add <code>.initialism</code> to an abbreviation for a slightly smaller font-size.</p>
757     <div class="bs-example">
758       <p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr> is the best thing since sliced bread.</p>
759     </div>
760 {% highlight html %}
761 <abbr title="HyperText Markup Language" class="initialism">HTML</abbr>
762 {% endhighlight %}
763
764
765     <!-- Addresses -->
766     <h2 id="type-addresses">Addresses</h2>
767     <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>
768     <div class="bs-example">
769       <address>
770         <strong>Twitter, Inc.</strong><br>
771         795 Folsom Ave, Suite 600<br>
772         San Francisco, CA 94107<br>
773         <abbr title="Phone">P:</abbr> (123) 456-7890
774       </address>
775       <address>
776         <strong>Full Name</strong><br>
777         <a href="mailto:#">first.last@example.com</a>
778       </address>
779     </div>
780 {% highlight html %}
781 <address>
782   <strong>Twitter, Inc.</strong><br>
783   795 Folsom Ave, Suite 600<br>
784   San Francisco, CA 94107<br>
785   <abbr title="Phone">P:</abbr> (123) 456-7890
786 </address>
787
788 <address>
789   <strong>Full Name</strong><br>
790   <a href="mailto:#">first.last@example.com</a>
791 </address>
792 {% endhighlight %}
793
794
795     <!-- Blockquotes -->
796     <h2 id="type-blockquotes">Blockquotes</h2>
797     <p>For quoting blocks of content from another source within your document.</p>
798
799     <h3>Default blockquote</h3>
800     <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>
801     <div class="bs-example">
802       <blockquote>
803         <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
804       </blockquote>
805     </div>
806 {% highlight html %}
807 <blockquote>
808   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
809 </blockquote>
810 {% endhighlight %}
811
812     <h3>Blockquote options</h3>
813     <p>Style and content changes for simple variations on a standard <code>&lt;blockquote&gt;</code>.</p>
814
815     <h4>Naming a source</h4>
816     <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>
817     <div class="bs-example">
818       <blockquote>
819         <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
820         <small>Someone famous in <cite title="Source Title">Source Title</cite></small>
821       </blockquote>
822     </div>
823 {% highlight html %}
824 <blockquote>
825   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
826   <small>Someone famous in <cite title="Source Title">Source Title</cite></small>
827 </blockquote>
828 {% endhighlight %}
829
830     <h4>Alternate displays</h4>
831     <p>Use <code>.pull-right</code> for a floated, right-aligned blockquote.</p>
832     <div class="bs-example" style="overflow: hidden;">
833       <blockquote class="pull-right">
834         <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
835         <small>Someone famous in <cite title="Source Title">Source Title</cite></small>
836       </blockquote>
837     </div>
838 {% highlight html %}
839 <blockquote class="pull-right">
840   ...
841 </blockquote>
842 {% endhighlight %}
843
844
845     <!-- Lists -->
846     <h2 id="type-lists">Lists</h2>
847
848     <h3>Unordered</h3>
849     <p>A list of items in which the order does <em>not</em> explicitly matter.</p>
850     <div class="bs-example">
851       <ul>
852         <li>Lorem ipsum dolor sit amet</li>
853         <li>Consectetur adipiscing elit</li>
854         <li>Integer molestie lorem at massa</li>
855         <li>Facilisis in pretium nisl aliquet</li>
856         <li>Nulla volutpat aliquam velit
857           <ul>
858             <li>Phasellus iaculis neque</li>
859             <li>Purus sodales ultricies</li>
860             <li>Vestibulum laoreet porttitor sem</li>
861             <li>Ac tristique libero volutpat at</li>
862           </ul>
863         </li>
864         <li>Faucibus porta lacus fringilla vel</li>
865         <li>Aenean sit amet erat nunc</li>
866         <li>Eget porttitor lorem</li>
867       </ul>
868     </div>
869 {% highlight html %}
870 <ul>
871   <li>...</li>
872 </ul>
873 {% endhighlight %}
874
875     <h3>Ordered</h3>
876     <p>A list of items in which the order <em>does</em> explicitly matter.</p>
877     <div class="bs-example">
878       <ol>
879         <li>Lorem ipsum dolor sit amet</li>
880         <li>Consectetur adipiscing elit</li>
881         <li>Integer molestie lorem at massa</li>
882         <li>Facilisis in pretium nisl aliquet</li>
883         <li>Nulla volutpat aliquam velit</li>
884         <li>Faucibus porta lacus fringilla vel</li>
885         <li>Aenean sit amet erat nunc</li>
886         <li>Eget porttitor lorem</li>
887       </ol>
888     </div>
889 {% highlight html %}
890 <ol>
891   <li>...</li>
892 </ol>
893 {% endhighlight %}
894
895     <h3>Unstyled</h3>
896     <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>
897     <div class="bs-example">
898       <ul class="list-unstyled">
899         <li>Lorem ipsum dolor sit amet</li>
900         <li>Consectetur adipiscing elit</li>
901         <li>Integer molestie lorem at massa</li>
902         <li>Facilisis in pretium nisl aliquet</li>
903         <li>Nulla volutpat aliquam velit
904           <ul>
905             <li>Phasellus iaculis neque</li>
906             <li>Purus sodales ultricies</li>
907             <li>Vestibulum laoreet porttitor sem</li>
908             <li>Ac tristique libero volutpat at</li>
909           </ul>
910         </li>
911         <li>Faucibus porta lacus fringilla vel</li>
912         <li>Aenean sit amet erat nunc</li>
913         <li>Eget porttitor lorem</li>
914       </ul>
915     </div>
916 {% highlight html %}
917 <ul class="list-unstyled">
918   <li>...</li>
919 </ul>
920 {% endhighlight %}
921
922     <h3>Inline</h3>
923     <p>Place all list items on a single line with <code>inline-block</code> and some light padding.</p>
924     <div class="bs-example">
925       <ul class="list-inline">
926         <li>Lorem ipsum</li>
927         <li>Phasellus iaculis</li>
928         <li>Nulla volutpat</li>
929       </ul>
930     </div>
931 {% highlight html %}
932 <ul class="list-inline">
933   <li>...</li>
934 </ul>
935 {% endhighlight %}
936
937     <h3>Description</h3>
938     <p>A list of terms with their associated descriptions.</p>
939     <div class="bs-example">
940       <dl>
941         <dt>Description lists</dt>
942         <dd>A description list is perfect for defining terms.</dd>
943         <dt>Euismod</dt>
944         <dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
945         <dd>Donec id elit non mi porta gravida at eget metus.</dd>
946         <dt>Malesuada porta</dt>
947         <dd>Etiam porta sem malesuada magna mollis euismod.</dd>
948       </dl>
949     </div>
950 {% highlight html %}
951 <dl>
952   <dt>...</dt>
953   <dd>...</dd>
954 </dl>
955 {% endhighlight %}
956
957     <h4>Horizontal description</h4>
958     <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>
959     <div class="bs-example">
960       <dl class="dl-horizontal">
961         <dt>Description lists</dt>
962         <dd>A description list is perfect for defining terms.</dd>
963         <dt>Euismod</dt>
964         <dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
965         <dd>Donec id elit non mi porta gravida at eget metus.</dd>
966         <dt>Malesuada porta</dt>
967         <dd>Etiam porta sem malesuada magna mollis euismod.</dd>
968         <dt>Felis euismod semper eget lacinia</dt>
969         <dd>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd>
970       </dl>
971     </div>
972 {% highlight html %}
973 <dl class="dl-horizontal">
974   <dt>...</dt>
975   <dd>...</dd>
976 </dl>
977 {% endhighlight %}
978
979     <div class="bs-callout bs-callout-info">
980       <h4>Auto-truncating</h4>
981       <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>
982     </div>
983   </div>
984
985
986   <!-- Code
987   ================================================== -->
988   <div class="bs-docs-section">
989     <div class="page-header">
990       <h1 id="code">Code</h1>
991     </div>
992
993     <h2>Inline</h2>
994     <p>Wrap inline snippets of code with <code>&lt;code&gt;</code>.</p>
995 <div class="bs-example">
996   For example, <code>&lt;section&gt;</code> should be wrapped as inline.
997 </div>
998 {% highlight html %}
999 For example, <code>&lt;section&gt;</code> should be wrapped as inline.
1000 {% endhighlight %}
1001
1002     <h2>Basic block</h2>
1003     <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>
1004 <div class="bs-example">
1005   <pre>&lt;p&gt;Sample text here...&lt;/p&gt;</pre>
1006 </div>
1007 {% highlight html %}
1008 <pre>&lt;p&gt;Sample text here...&lt;/p&gt;</pre>
1009 {% endhighlight %}
1010
1011     <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>
1012   </div>
1013
1014
1015
1016   <!-- Tables
1017   ================================================== -->
1018   <div class="bs-docs-section">
1019     <div class="page-header">
1020       <h1 id="tables">Tables</h1>
1021     </div>
1022
1023     <h2 id="tables-example">Basic example</h2>
1024     <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>
1025     <div class="bs-example">
1026       <table class="table">
1027         <thead>
1028           <tr>
1029             <th>#</th>
1030             <th>First Name</th>
1031             <th>Last Name</th>
1032             <th>Username</th>
1033           </tr>
1034         </thead>
1035         <tbody>
1036           <tr>
1037             <td>1</td>
1038             <td>Mark</td>
1039             <td>Otto</td>
1040             <td>@mdo</td>
1041           </tr>
1042           <tr>
1043             <td>2</td>
1044             <td>Jacob</td>
1045             <td>Thornton</td>
1046             <td>@fat</td>
1047           </tr>
1048           <tr>
1049             <td>3</td>
1050             <td>Larry</td>
1051             <td>the Bird</td>
1052             <td>@twitter</td>
1053           </tr>
1054         </tbody>
1055       </table>
1056     </div><!-- /example -->
1057 {% highlight html %}
1058 <table class="table">
1059   ...
1060 </table>
1061 {% endhighlight %}
1062
1063
1064     <h2 id="tables-striped">Striped rows</h2>
1065     <p>Use <code>.table-striped</code> to add zebra-striping to any table row within the <code>&lt;tbody&gt;</code>.</p>
1066     <div class="bs-callout bs-callout-danger">
1067       <h4>Cross-browser compatibility</h4>
1068       <p>Striped tables are styled via the <code>:nth-child</code> CSS selector, which is not available in Internet Explorer 8.</p>
1069     </div>
1070     <div class="bs-example">
1071       <table class="table table-striped">
1072         <thead>
1073           <tr>
1074             <th>#</th>
1075             <th>First Name</th>
1076             <th>Last Name</th>
1077             <th>Username</th>
1078           </tr>
1079         </thead>
1080         <tbody>
1081           <tr>
1082             <td>1</td>
1083             <td>Mark</td>
1084             <td>Otto</td>
1085             <td>@mdo</td>
1086           </tr>
1087           <tr>
1088             <td>2</td>
1089             <td>Jacob</td>
1090             <td>Thornton</td>
1091             <td>@fat</td>
1092           </tr>
1093           <tr>
1094             <td>3</td>
1095             <td>Larry</td>
1096             <td>the Bird</td>
1097             <td>@twitter</td>
1098           </tr>
1099         </tbody>
1100       </table>
1101     </div><!-- /example -->
1102 {% highlight html %}
1103 <table class="table table-striped">
1104   ...
1105 </table>
1106 {% endhighlight %}
1107
1108
1109     <h2 id="tables-bordered">Bordered table</h2>
1110     <p>Add <code>.table-bordered</code> for borders on all sides of the table and cells.</p>
1111     <div class="bs-example">
1112       <table class="table table-bordered">
1113         <thead>
1114           <tr>
1115             <th>#</th>
1116             <th>First Name</th>
1117             <th>Last Name</th>
1118             <th>Username</th>
1119           </tr>
1120         </thead>
1121         <tbody>
1122           <tr>
1123             <td rowspan="2">1</td>
1124             <td>Mark</td>
1125             <td>Otto</td>
1126             <td>@mdo</td>
1127           </tr>
1128           <tr>
1129             <td>Mark</td>
1130             <td>Otto</td>
1131             <td>@TwBootstrap</td>
1132           </tr>
1133           <tr>
1134             <td>2</td>
1135             <td>Jacob</td>
1136             <td>Thornton</td>
1137             <td>@fat</td>
1138           </tr>
1139           <tr>
1140             <td>3</td>
1141             <td colspan="2">Larry the Bird</td>
1142             <td>@twitter</td>
1143           </tr>
1144         </tbody>
1145       </table>
1146     </div><!-- /example -->
1147 {% highlight html %}
1148 <table class="table table-bordered">
1149   ...
1150 </table>
1151 {% endhighlight %}
1152
1153
1154     <h2 id="tables-hover-rows">Hover rows</h2>
1155     <p>Add <code>.table-hover</code> to enable a hover state on table rows within a <code>&lt;tbody&gt;</code>.</p>
1156     <div class="bs-example">
1157       <table class="table table-hover">
1158         <thead>
1159           <tr>
1160             <th>#</th>
1161             <th>First Name</th>
1162             <th>Last Name</th>
1163             <th>Username</th>
1164           </tr>
1165         </thead>
1166         <tbody>
1167           <tr>
1168             <td>1</td>
1169             <td>Mark</td>
1170             <td>Otto</td>
1171             <td>@mdo</td>
1172           </tr>
1173           <tr>
1174             <td>2</td>
1175             <td>Jacob</td>
1176             <td>Thornton</td>
1177             <td>@fat</td>
1178           </tr>
1179           <tr>
1180             <td>3</td>
1181             <td colspan="2">Larry the Bird</td>
1182             <td>@twitter</td>
1183           </tr>
1184         </tbody>
1185       </table>
1186     </div><!-- /example -->
1187 {% highlight html %}
1188 <table class="table table-hover">
1189   ...
1190 </table>
1191 {% endhighlight %}
1192
1193
1194     <h2 id="tables-condensed">Condensed table</h2>
1195     <p>Add <code>.table-condensed</code> to make tables more compact by cutting cell padding in half.</p>
1196     <div class="bs-example">
1197       <table class="table table-condensed">
1198         <thead>
1199           <tr>
1200             <th>#</th>
1201             <th>First Name</th>
1202             <th>Last Name</th>
1203             <th>Username</th>
1204           </tr>
1205         </thead>
1206         <tbody>
1207           <tr>
1208             <td>1</td>
1209             <td>Mark</td>
1210             <td>Otto</td>
1211             <td>@mdo</td>
1212           </tr>
1213           <tr>
1214             <td>2</td>
1215             <td>Jacob</td>
1216             <td>Thornton</td>
1217             <td>@fat</td>
1218           </tr>
1219           <tr>
1220             <td>3</td>
1221             <td colspan="2">Larry the Bird</td>
1222             <td>@twitter</td>
1223           </tr>
1224         </tbody>
1225       </table>
1226     </div><!-- /example -->
1227 {% highlight html %}
1228 <table class="table table-condensed">
1229   ...
1230 </table>
1231 {% endhighlight %}
1232
1233
1234
1235     <h2 id="tables-contextual-classes">Contextual classes</h2>
1236     <p>Use contextual classes to color table rows or individual cells.</p>
1237     <div class="bs-table-scrollable">
1238       <table class="table table-bordered table-striped bs-table">
1239         <colgroup>
1240           <col class="col-lg-1">
1241           <col class="col-lg-7">
1242         </colgroup>
1243         <thead>
1244           <tr>
1245             <th>Class</th>
1246             <th>Description</th>
1247           </tr>
1248         </thead>
1249         <tbody>
1250           <tr>
1251             <td>
1252               <code>.active</code>
1253             </td>
1254             <td>Applies the hover color to a particular row or cell</td>
1255           </tr>
1256           <tr>
1257             <td>
1258               <code>.success</code>
1259             </td>
1260             <td>Indicates a successful or positive action</td>
1261           </tr>
1262           <tr>
1263             <td>
1264               <code>.warning</code>
1265             </td>
1266             <td>Indicates a warning that might need attention</td>
1267           </tr>
1268           <tr>
1269             <td>
1270               <code>.danger</code>
1271             </td>
1272             <td>Indicates a dangerous or potentially negative action</td>
1273           </tr>
1274         </tbody>
1275       </table>
1276     </div>
1277     <div class="bs-example">
1278       <table class="table">
1279         <thead>
1280           <tr>
1281             <th>#</th>
1282             <th>Column heading</th>
1283             <th>Column heading</th>
1284             <th>Column heading</th>
1285           </tr>
1286         </thead>
1287         <tbody>
1288           <tr class="active">
1289             <td>1</td>
1290             <td>Column content</td>
1291             <td>Column content</td>
1292             <td>Column content</td>
1293           </tr>
1294           <tr>
1295             <td>2</td>
1296             <td>Column content</td>
1297             <td>Column content</td>
1298             <td>Column content</td>
1299           </tr>
1300           <tr class="success">
1301             <td>3</td>
1302             <td>Column content</td>
1303             <td>Column content</td>
1304             <td>Column content</td>
1305           </tr>
1306           <tr>
1307             <td>4</td>
1308             <td>Column content</td>
1309             <td>Column content</td>
1310             <td>Column content</td>
1311           </tr>
1312           <tr class="warning">
1313             <td>5</td>
1314             <td>Column content</td>
1315             <td>Column content</td>
1316             <td>Column content</td>
1317           </tr>
1318           <tr>
1319             <td>6</td>
1320             <td>Column content</td>
1321             <td>Column content</td>
1322             <td>Column content</td>
1323           </tr>
1324           <tr class="danger">
1325             <td>7</td>
1326             <td>Column content</td>
1327             <td>Column content</td>
1328             <td>Column content</td>
1329           </tr>
1330         </tbody>
1331       </table>
1332     </div><!-- /example -->
1333 {% highlight html %}
1334 <!-- On rows -->
1335 <tr class="active">...</tr>
1336 <tr class="success">...</tr>
1337 <tr class="warning">...</tr>
1338 <tr class="danger">...</tr>
1339
1340 <!-- On cells (`td` or `th`) -->
1341 <tr>
1342   <td class="active">...</td>
1343   <td class="success">...</td>
1344   <td class="warning">...</td>
1345   <td class="danger">...</td>
1346 </tr>
1347 {% endhighlight %}
1348
1349   </div>
1350
1351
1352
1353   <!-- Forms
1354   ================================================== -->
1355   <div class="bs-docs-section">
1356     <div class="page-header">
1357       <h1 id="forms">Forms</h1>
1358     </div>
1359
1360     <h2 id="forms-example">Basic example</h2>
1361     <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>
1362     <form class="bs-example" role="form">
1363       <div class="form-group">
1364         <label for="exampleInputEmail1">Email address</label>
1365         <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
1366       </div>
1367       <div class="form-group">
1368         <label for="exampleInputPassword1">Password</label>
1369         <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
1370       </div>
1371       <div class="form-group">
1372         <label for="exampleInputFile">File input</label>
1373         <input type="file" id="exampleInputFile">
1374         <p class="help-block">Example block-level help text here.</p>
1375       </div>
1376       <div class="checkbox">
1377         <label>
1378           <input type="checkbox"> Check me out
1379         </label>
1380       </div>
1381       <button type="submit" class="btn btn-default">Submit</button>
1382     </form><!-- /example -->
1383 {% highlight html %}
1384 <form role="form">
1385   <div class="form-group">
1386     <label for="exampleInputEmail1">Email address</label>
1387     <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
1388   </div>
1389   <div class="form-group">
1390     <label for="exampleInputPassword1">Password</label>
1391     <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
1392   </div>
1393   <div class="form-group">
1394     <label for="exampleInputFile">File input</label>
1395     <input type="file" id="exampleInputFile">
1396     <p class="help-block">Example block-level help text here.</p>
1397   </div>
1398   <div class="checkbox">
1399     <label>
1400       <input type="checkbox"> Check me out
1401     </label>
1402   </div>
1403   <button type="submit" class="btn btn-default">Submit</button>
1404 </form>
1405 {% endhighlight %}
1406
1407
1408     <h2 id="forms-inline">Inline form</h2>
1409     <p>Add <code>.form-inline</code> for left-aligned and inline-block controls for a compact layout.</p>
1410     <div class="bs-callout bs-callout-danger">
1411       <h4>Requires custom widths</h4>
1412       <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>
1413     </div>
1414     <div class="bs-callout bs-callout-danger">
1415       <h4>Always add labels</h4>
1416       <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>
1417     </div>
1418     <form class="bs-example form-inline" role="form">
1419       <div class="form-group">
1420         <label class="sr-only" for="exampleInputEmail2">Email address</label>
1421         <input type="email" class="form-control" id="exampleInputEmail2" placeholder="Enter email">
1422       </div>
1423       <div class="form-group">
1424         <label class="sr-only" for="exampleInputPassword2">Password</label>
1425         <input type="password" class="form-control" id="exampleInputPassword2" placeholder="Password">
1426       </div>
1427       <div class="checkbox">
1428         <label>
1429           <input type="checkbox"> Remember me
1430         </label>
1431       </div>
1432       <button type="submit" class="btn btn-default">Sign in</button>
1433     </form><!-- /example -->
1434 {% highlight html %}
1435 <form class="form-inline" role="form">
1436   <div class="form-group">
1437     <label class="sr-only" for="exampleInputEmail2">Email address</label>
1438     <input type="email" class="form-control" id="exampleInputEmail2" placeholder="Enter email">
1439   </div>
1440   <div class="form-group">
1441     <label class="sr-only" for="exampleInputPassword2">Password</label>
1442     <input type="password" class="form-control" id="exampleInputPassword2" placeholder="Password">
1443   </div>
1444   <div class="checkbox">
1445     <label>
1446       <input type="checkbox"> Remember me
1447     </label>
1448   </div>
1449   <button type="submit" class="btn btn-default">Sign in</button>
1450 </form>
1451 {% endhighlight %}
1452
1453
1454     <h2 id="forms-horizontal">Horizontal form</h2>
1455     <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>
1456     <form class="bs-example form-horizontal">
1457       <div class="form-group">
1458         <label for="inputEmail1" class="col-lg-2 control-label">Email</label>
1459         <div class="col-lg-10">
1460           <input type="email" class="form-control" id="inputEmail1" placeholder="Email">
1461         </div>
1462       </div>
1463       <div class="form-group">
1464         <label for="inputPassword1" class="col-lg-2 control-label">Password</label>
1465         <div class="col-lg-10">
1466           <input type="password" class="form-control" id="inputPassword1" placeholder="Password">
1467         </div>
1468       </div>
1469       <div class="form-group">
1470         <div class="col-lg-offset-2 col-lg-10">
1471           <div class="checkbox">
1472             <label>
1473               <input type="checkbox"> Remember me
1474             </label>
1475           </div>
1476         </div>
1477       </div>
1478       <div class="form-group">
1479         <div class="col-lg-offset-2 col-lg-10">
1480           <button type="submit" class="btn btn-default">Sign in</button>
1481         </div>
1482       </div>
1483     </form>
1484 {% highlight html %}
1485 <form class="form-horizontal" role="form">
1486   <div class="form-group">
1487     <label for="inputEmail1" class="col-lg-2 control-label">Email</label>
1488     <div class="col-lg-10">
1489       <input type="email" class="form-control" id="inputEmail1" placeholder="Email">
1490     </div>
1491   </div>
1492   <div class="form-group">
1493     <label for="inputPassword1" class="col-lg-2 control-label">Password</label>
1494     <div class="col-lg-10">
1495       <input type="password" class="form-control" id="inputPassword1" placeholder="Password">
1496     </div>
1497   </div>
1498   <div class="form-group">
1499     <div class="col-lg-offset-2 col-lg-10">
1500       <div class="checkbox">
1501         <label>
1502           <input type="checkbox"> Remember me
1503         </label>
1504       </div>
1505     </div>
1506   </div>
1507   <div class="form-group">
1508     <div class="col-lg-offset-2 col-lg-10">
1509       <button type="submit" class="btn btn-default">Sign in</button>
1510     </div>
1511   </div>
1512 </form>
1513 {% endhighlight %}
1514
1515
1516     <h2 id="forms-controls">Supported controls</h2>
1517     <p>Examples of standard form controls supported in an example form layout.</p>
1518
1519     <h3>Inputs</h3>
1520     <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>
1521     <div class="bs-callout bs-callout-danger">
1522       <h4>Type declaration required</h4>
1523       <p>Inputs will only be fully styled if their <code>type</code> is properly declared.</p>
1524     </div>
1525     <form class="bs-example">
1526       <input type="text" class="form-control" placeholder="Text input">
1527     </form>
1528 {% highlight html %}
1529 <input type="text" class="form-control" placeholder="Text input">
1530 {% endhighlight %}
1531
1532     <h3>Textarea</h3>
1533     <p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p>
1534     <form class="bs-example">
1535       <textarea class="form-control" rows="3"></textarea>
1536     </form>
1537 {% highlight html %}
1538 <textarea class="form-control" rows="3"></textarea>
1539 {% endhighlight %}
1540
1541     <h3>Checkboxes and radios</h3>
1542     <p>Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.</p>
1543     <h4>Default (stacked)</h4>
1544     <form class="bs-example">
1545       <div class="checkbox">
1546         <label>
1547           <input type="checkbox" value="">
1548           Option one is this and that&mdash;be sure to include why it's great
1549         </label>
1550       </div>
1551       <br>
1552       <div class="radio">
1553         <label>
1554           <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
1555           Option one is this and that&mdash;be sure to include why it's great
1556         </label>
1557       </div>
1558       <div class="radio">
1559         <label>
1560           <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
1561           Option two can be something else and selecting it will deselect option one
1562         </label>
1563       </div>
1564     </form>
1565 {% highlight html %}
1566 <div class="checkbox">
1567   <label>
1568     <input type="checkbox" value="">
1569     Option one is this and that&mdash;be sure to include why it's great
1570   </label>
1571 </div>
1572
1573 <div class="radio">
1574   <label>
1575     <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
1576     Option one is this and that&mdash;be sure to include why it's great
1577   </label>
1578 </div>
1579 <div class="radio">
1580   <label>
1581     <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
1582     Option two can be something else and selecting it will deselect option one
1583   </label>
1584 </div>
1585 {% endhighlight %}
1586
1587     <h4>Inline checkboxes</h4>
1588     <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>
1589     <form class="bs-example">
1590       <label class="checkbox-inline">
1591         <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
1592       </label>
1593       <label class="checkbox-inline">
1594         <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
1595       </label>
1596       <label class="checkbox-inline">
1597         <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
1598       </label>
1599     </form>
1600 {% highlight html %}
1601 <label class="checkbox-inline">
1602   <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
1603 </label>
1604 <label class="checkbox-inline">
1605   <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
1606 </label>
1607 <label class="checkbox-inline">
1608   <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
1609 </label>
1610 {% endhighlight %}
1611
1612     <h3>Selects</h3>
1613     <p>Use the default option, or add <code>multiple</code> to show multiple options at once.</p>
1614     <form class="bs-example">
1615       <select class="form-control">
1616         <option>1</option>
1617         <option>2</option>
1618         <option>3</option>
1619         <option>4</option>
1620         <option>5</option>
1621       </select>
1622       <br>
1623       <select multiple class="form-control">
1624         <option>1</option>
1625         <option>2</option>
1626         <option>3</option>
1627         <option>4</option>
1628         <option>5</option>
1629       </select>
1630     </form>
1631 {% highlight html %}
1632 <select class="form-control">
1633   <option>1</option>
1634   <option>2</option>
1635   <option>3</option>
1636   <option>4</option>
1637   <option>5</option>
1638 </select>
1639
1640 <select multiple class="form-control">
1641   <option>1</option>
1642   <option>2</option>
1643   <option>3</option>
1644   <option>4</option>
1645   <option>5</option>
1646 </select>
1647 {% endhighlight %}
1648
1649
1650     <h2 id="forms-controls-static">Static control</h2>
1651     <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>
1652     <form class="bs-example form-horizontal">
1653       <div class="form-group">
1654         <label class="col-lg-2 control-label">Email</label>
1655         <div class="col-lg-10">
1656           <p class="form-control-static">email@example.com</p>
1657         </div>
1658       </div>
1659       <div class="form-group">
1660         <label for="inputPassword" class="col-lg-2 control-label">Password</label>
1661         <div class="col-lg-10">
1662           <input type="password" class="form-control" id="inputPassword" placeholder="Password">
1663         </div>
1664       </div>
1665     </form>
1666 {% highlight html %}
1667 <form class="form-horizontal" role="form">
1668   <div class="form-group">
1669     <label class="col-lg-2 control-label">Email</label>
1670     <div class="col-lg-10">
1671       <p class="form-control-static">email@example.com</p>
1672     </div>
1673   </div>
1674   <div class="form-group">
1675     <label for="inputPassword" class="col-lg-2 control-label">Password</label>
1676     <div class="col-lg-10">
1677       <input type="password" class="form-control" id="inputPassword" placeholder="Password">
1678     </div>
1679   </div>
1680 </form>
1681 {% endhighlight %}
1682
1683
1684     <h2 id="forms-control-states">Form states</h2>
1685     <p>Provide feedback to users or visitors with basic feedback states on form controls and labels.</p>
1686
1687     <h3 id="forms-input-focus">Input focus</h3>
1688     <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>
1689     <form class="bs-example">
1690       <input class="form-control" id="focusedInput" type="text" value="This is focused...">
1691     </form>
1692 {% highlight html %}
1693 <input class="form-control" id="focusedInput" type="text" value="This is focused...">
1694 {% endhighlight %}
1695
1696     <h3 id="forms-disabled-inputs">Disabled inputs</h3>
1697     <p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p>
1698     <form class="bs-example">
1699       <input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here…" disabled>
1700     </form>
1701 {% highlight html %}
1702 <input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
1703 {% endhighlight %}
1704
1705     <h3 id="forms-disabled-fieldsets">Disabled fieldsets</h3>
1706     <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>
1707
1708     <div class="bs-callout bs-callout-warning">
1709       <h4>Link functionality of <code>&lt;a&gt;</code> not impacted</h4>
1710       <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>
1711     </div>
1712
1713     <div class="bs-callout bs-callout-danger">
1714       <h4>Cross-browser compatibility</h4>
1715       <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>
1716     </div>
1717
1718     <form class="bs-example">
1719       <fieldset disabled>
1720         <div class="form-group">
1721           <label for="disabledTextInput">Disabled input</label>
1722           <input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input">
1723         </div>
1724         <div class="form-group">
1725           <label for="disabledSelect">Disabled select menu</label>
1726           <select id="disabledSelect" class="form-control">
1727             <option>Disabled select</option>
1728           </select>
1729         </div>
1730         <div class="checkbox">
1731           <label>
1732             <input type="checkbox"> Can't check this
1733           </label>
1734         </div>
1735         <button type="submit" class="btn btn-primary">Submit</button>
1736       </fieldset>
1737     </form>
1738 {% highlight html %}
1739 <form class="form-inline" role="form">
1740   <fieldset disabled>
1741     <div class="form-group">
1742       <label for="disabledTextInput">Disabled input</label>
1743       <input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input">
1744     </div>
1745     <div class="form-group">
1746       <label for="disabledSelect">Disabled select menu</label>
1747       <select id="disabledSelect" class="form-control">
1748         <option>Disabled select</option>
1749       </select>
1750     </div>
1751     <div class="checkbox">
1752       <label>
1753         <input type="checkbox"> Can't check this
1754       </label>
1755     </div>
1756     <button type="submit" class="btn btn-primary">Submit</button>
1757   </fieldset>
1758 </form>
1759 {% endhighlight %}
1760
1761     <h3 id="forms-validation">Validation states</h3>
1762     <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>
1763
1764     <form class="bs-example">
1765       <div class="form-group has-success">
1766         <label class="control-label" for="inputSuccess">Input with success</label>
1767         <input type="text" class="form-control" id="inputSuccess">
1768       </div>
1769       <div class="form-group has-warning">
1770         <label class="control-label" for="inputWarning">Input with warning</label>
1771         <input type="text" class="form-control" id="inputWarning">
1772       </div>
1773       <div class="form-group has-error">
1774         <label class="control-label" for="inputError">Input with error</label>
1775         <input type="text" class="form-control" id="inputError">
1776       </div>
1777     </form>
1778 {% highlight html %}
1779 <div class="form-group has-success">
1780   <label class="control-label" for="inputSuccess">Input with success</label>
1781   <input type="text" class="form-control" id="inputSuccess">
1782 </div>
1783 <div class="form-group has-warning">
1784   <label class="control-label" for="inputWarning">Input with warning</label>
1785   <input type="text" class="form-control" id="inputWarning">
1786 </div>
1787 <div class="form-group has-error">
1788   <label class="control-label" for="inputError">Input with error</label>
1789   <input type="text" class="form-control" id="inputError">
1790 </div>
1791 {% endhighlight %}
1792
1793
1794     <h2 id="forms-control-sizes">Control sizing</h2>
1795     <p>Set heights using classes like <code>.input-lg</code>, and set widths using grid column classes like <code>.col-lg-*</code>.</p>
1796
1797     <h3>Height sizing</h3>
1798     <p>Create larger or smaller form controls that match button sizes.</p>
1799     <form class="bs-example bs-example-control-sizing">
1800       <div class="controls docs-input-sizes">
1801         <input class="form-control input-lg" type="text" placeholder=".input-lg">
1802         <input type="text" class="form-control" placeholder="Default input">
1803         <input class="form-control input-sm" type="text" placeholder=".input-sm">
1804
1805         <select class="form-control input-lg">
1806           <option value="">.input-lg</option>
1807         </select>
1808         <select class="form-control">
1809           <option value="">Default select</option>
1810         </select>
1811         <select class="form-control input-sm">
1812           <option value="">.input-sm</option>
1813         </select>
1814       </div>
1815     </form>
1816 {% highlight html %}
1817 <input class="form-control input-lg" type="text" placeholder=".input-lg">
1818 <input class="form-control" type="text" placeholder="Default input">
1819 <input class="form-control input-sm" type="text" placeholder=".input-sm">
1820
1821 <select class="form-control input-lg">...</select>
1822 <select class="form-control">...</select>
1823 <select class="form-control input-sm">...</select>
1824 {% endhighlight %}
1825
1826     <h3>Column sizing</h3>
1827     <p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p>
1828     <form class="bs-example" style="padding-bottom: 15px;">
1829       <div class="row">
1830         <div class="col-lg-2">
1831           <input type="text" class="form-control" placeholder=".col-lg-2">
1832         </div>
1833         <div class="col-lg-3">
1834           <input type="text" class="form-control" placeholder=".col-lg-3">
1835         </div>
1836         <div class="col-lg-4">
1837           <input type="text" class="form-control" placeholder=".col-lg-4">
1838         </div>
1839       </div>
1840     </form>
1841 {% highlight html %}
1842 <div class="row">
1843   <div class="col-lg-2">
1844     <input type="text" class="form-control" placeholder=".col-lg-2">
1845   </div>
1846   <div class="col-lg-3">
1847     <input type="text" class="form-control" placeholder=".col-lg-3">
1848   </div>
1849   <div class="col-lg-4">
1850     <input type="text" class="form-control" placeholder=".col-lg-4">
1851   </div>
1852 </div>
1853 {% endhighlight %}
1854
1855     <h2 id="forms-help-text">Help text</h2>
1856     <p>Block level help text for form controls.</p>
1857     <form class="bs-example">
1858       <input type="text" class="form-control">
1859       <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
1860     </form>
1861 {% highlight html %}
1862 <span class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</span>
1863 {% endhighlight %}
1864
1865   </div>
1866
1867
1868
1869   <!-- Buttons
1870   ================================================== -->
1871   <div class="bs-docs-section">
1872     <div class="page-header">
1873       <h1 id="buttons">Buttons</h1>
1874     </div>
1875
1876     <h2 id="buttons-options">Options</h2>
1877     <p>Use any of the available button classes to quickly create a styled button.</p>
1878     <div class="bs-example">
1879       <button type="button" class="btn btn-default">Default</button>
1880       <button type="button" class="btn btn-primary">Primary</button>
1881       <button type="button" class="btn btn-success">Success</button>
1882       <button type="button" class="btn btn-info">Info</button>
1883       <button type="button" class="btn btn-warning">Warning</button>
1884       <button type="button" class="btn btn-danger">Danger</button>
1885       <button type="button" class="btn btn-link">Link</button>
1886     </div>
1887 {% highlight html %}
1888 <!-- Standard gray button with gradient -->
1889 <button type="button" class="btn btn-default">Default</button>
1890
1891 <!-- Provides extra visual weight and identifies the primary action in a set of buttons -->
1892 <button type="button" class="btn btn-primary">Primary</button>
1893
1894 <!-- Indicates a successful or positive action -->
1895 <button type="button" class="btn btn-success">Success</button>
1896
1897 <!-- Contextual button for informational alert messages -->
1898 <button type="button" class="btn btn-info">Info</button>
1899
1900 <!-- Indicates caution should be taken with this action -->
1901 <button type="button" class="btn btn-warning">Warning</button>
1902
1903 <!-- Indicates a dangerous or potentially negative action -->
1904 <button type="button" class="btn btn-danger">Danger</button>
1905
1906 <!-- Deemphasize a button by making it look like a link while maintaining button behavior -->
1907 <button type="button" class="btn btn-link">Link</button>
1908 {% endhighlight %}
1909
1910     <h2 id="buttons-sizes">Sizes</h2>
1911     <p>Fancy larger or smaller buttons? Add <code>.btn-lg</code>, <code>.btn-sm</code>, or <code>.btn-xs</code> for additional sizes.</p>
1912     <div class="bs-example">
1913       <p>
1914         <button type="button" class="btn btn-primary btn-lg">Large button</button>
1915         <button type="button" class="btn btn-default btn-lg">Large button</button>
1916       </p>
1917       <p>
1918         <button type="button" class="btn btn-primary">Default button</button>
1919         <button type="button" class="btn btn-default">Default button</button>
1920       </p>
1921       <p>
1922         <button type="button" class="btn btn-primary btn-sm">Small button</button>
1923         <button type="button" class="btn btn-default btn-sm">Small button</button>
1924       </p>
1925       <p>
1926         <button type="button" class="btn btn-primary btn-xs">Extra small button</button>
1927         <button type="button" class="btn btn-default btn-xs">Extra small button</button>
1928       </p>
1929     </div>
1930 {% highlight html %}
1931 <p>
1932   <button type="button" class="btn btn-primary btn-lg">Large button</button>
1933   <button type="button" class="btn btn-default btn-lg">Large button</button>
1934 </p>
1935 <p>
1936   <button type="button" class="btn btn-primary">Default button</button>
1937   <button type="button" class="btn btn-default">Default button</button>
1938 </p>
1939 <p>
1940   <button type="button" class="btn btn-primary btn-sm">Small button</button>
1941   <button type="button" class="btn btn-default btn-sm">Small button</button>
1942 </p>
1943 <p>
1944   <button type="button" class="btn btn-primary btn-xs">Extra small button</button>
1945   <button type="button" class="btn btn-default btn-xs">Extra small button</button>
1946 </p>
1947 {% endhighlight %}
1948
1949     <p>Create block level buttons&mdash;those that span the full width of a parent&mdash; by adding <code>.btn-block</code>.</p>
1950     <div class="bs-example">
1951       <div class="well" style="max-width: 400px; margin: 0 auto 10px;">
1952         <button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button>
1953         <button type="button" class="btn btn-default btn-lg btn-block">Block level button</button>
1954       </div>
1955     </div>
1956 {% highlight html %}
1957 <button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button>
1958 <button type="button" class="btn btn-default btn-lg btn-block">Block level button</button>
1959 {% endhighlight %}
1960
1961
1962     <h2 id="buttons-disabled">Disabled state</h2>
1963     <p>Make buttons look unclickable by fading them back 50%.</p>
1964
1965     <h3>Button element</h3>
1966     <p>Add the <code>disabled</code> attribute to <code>&lt;button&gt;</code> buttons.</p>
1967     <p class="bs-example">
1968       <button type="button" class="btn btn-primary btn-lg" disabled="disabled">Primary button</button>
1969       <button type="button" class="btn btn-default btn-lg" disabled="disabled">Button</button>
1970     </p>
1971 {% highlight html %}
1972 <button type="button" class="btn btn-lg btn-primary" disabled="disabled">Primary button</button>
1973 <button type="button" class="btn btn-default btn-lg" disabled="disabled">Button</button>
1974 {% endhighlight %}
1975
1976     <div class="bs-callout bs-callout-danger">
1977       <h4>Cross-browser compatibility</h4>
1978       <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>
1979     </div>
1980
1981     <h3>Anchor element</h3>
1982     <p>Add the <code>.disabled</code> class to <code>&lt;a&gt;</code> buttons.</p>
1983     <p class="bs-example">
1984       <a href="#" class="btn btn-primary btn-lg disabled">Primary link</a>
1985       <a href="#" class="btn btn-default btn-lg disabled">Link</a>
1986     </p>
1987 {% highlight html %}
1988 <a href="#" class="btn btn-primary btn-lg disabled">Primary link</a>
1989 <a href="#" class="btn btn-default btn-lg disabled">Link</a>
1990 {% endhighlight %}
1991     <p>
1992       We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required.
1993     </p>
1994     <div class="bs-callout bs-callout-warning">
1995       <h4>Link functionality not impacted</h4>
1996       <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>
1997     </div>
1998
1999
2000     <h2 id="buttons-tags">Button tags</h2>
2001     <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>
2002     <form class="bs-example">
2003       <a class="btn btn-default" href="#">Link</a>
2004       <button class="btn btn-default" type="submit">Button</button>
2005       <input class="btn btn-default" type="button" value="Input">
2006       <input class="btn btn-default" type="submit" value="Submit">
2007     </form>
2008 {% highlight html %}
2009 <a class="btn btn-default" href="#">Link</a>
2010 <button class="btn btn-default" type="submit">Button</button>
2011 <input class="btn btn-default" type="button" value="Input">
2012 <input class="btn btn-default" type="submit" value="Submit">
2013 {% endhighlight %}
2014
2015     <div class="bs-callout bs-callout-warning">
2016       <h4>Cross-browser rendering</h4>
2017       <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>
2018       <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>
2019     </div>
2020
2021   </div>
2022
2023
2024
2025   <!-- Images
2026   ================================================== -->
2027   <div class="bs-docs-section">
2028     <div class="page-header">
2029       <h1 id="images">Images</h1>
2030     </div>
2031
2032     <p>Add classes to an <code>&lt;img&gt;</code> element to easily style images in any project.</p>
2033     <div class="bs-callout bs-callout-danger">
2034       <h4>Cross-browser compatibility</h4>
2035       <p>Keep in mind that Internet Explorer 8 lacks support for rounded corners.</p>
2036     </div>
2037     <div class="bs-example bs-example-images">
2038       <img data-src="holder.js/140x140" src="data:image/png;base64," class="img-rounded" alt="A generic square placeholder image with rounded corners">
2039       <img data-src="holder.js/140x140" src="data:image/png;base64," class="img-circle" alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible">
2040       <img data-src="holder.js/140x140" src="data:image/png;base64," 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">
2041     </div>
2042 {% highlight html %}
2043 <img src="..." alt="..." class="img-rounded">
2044 <img src="..." alt="..." class="img-circle">
2045 <img src="..." alt="..." class="img-thumbnail">
2046 {% endhighlight %}
2047
2048     <div class="bs-callout bs-callout-warning">
2049       <h4>Responsive images</h4>
2050       <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>
2051     </div>
2052
2053   </div>
2054
2055
2056   <!-- Helpers
2057   ================================================== -->
2058   <div class="bs-docs-section">
2059     <div class="page-header">
2060       <h1 id="helper-classes">Helper classes</h1>
2061     </div>
2062
2063     <h3>Close icon</h3>
2064     <p>Use the generic close icon for dismissing content like modals and alerts.</p>
2065     <div class="bs-example">
2066       <p><button type="button" class="close" aria-hidden="true">&times;</button></p>
2067     </div>
2068 {% highlight html %}
2069 <button type="button" class="close" aria-hidden="true">&times;</button>
2070 {% endhighlight %}
2071
2072     <h3>.pull-left</h3>
2073     <p>Float an element left</p>
2074 {% highlight html %}
2075 <div class="pull-left">...</div>
2076 {% endhighlight %}
2077 {% highlight css %}
2078 .pull-left {
2079   float: left;
2080 }
2081 {% endhighlight %}
2082
2083     <h3>.pull-right</h3>
2084     <p>Float an element right</p>
2085 {% highlight html %}
2086 <div class="pull-right">...</div>
2087 {% endhighlight %}
2088 {% highlight css %}
2089 .pull-right {
2090   float: right;
2091 }
2092 {% endhighlight %}
2093
2094     <h3>.clearfix</h3>
2095     <p>Clear the <code>float</code> on any element. Utilizes <a href="http://nicolasgallagher.com/micro-clearfix-hack/">the micro clearfix</a> as popularized by Nicolas Gallagher.</p>
2096 {% highlight html %}
2097 <div class="clearfix">...</div>
2098 {% endhighlight %}
2099 {% highlight css %}
2100 // Mixin
2101 .clearfix() {
2102   &:before,
2103   &:after {
2104     content: " ";
2105     display: table;
2106   }
2107   &:after {
2108     clear: both;
2109   }
2110 }
2111
2112 // Usage
2113 .element {
2114   .clearfix();
2115 }
2116 {% endhighlight %}
2117
2118     <h3>.sr-only</h3>
2119     <p>Hide an element to all users <em>except</em> screen readers. Necessary for following <a href="{{ page.base_url }}getting-started#accessibility">accessibility best practices</a>.</p>
2120 {% highlight html %}
2121 <a class="sr-only" href="#content">Skip to content</a>
2122 {% endhighlight %}
2123   </div>
2124
2125   <!-- Responsive utilities
2126   ================================================== -->
2127   <div class="bs-docs-section" id="responsive-utilities">
2128     <div class="page-header">
2129       <h1>Responsive utilities</h1>
2130     </div>
2131     <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>
2132
2133     <h3>Responsive classes</h3>
2134     <div class="bs-table-scrollable">
2135       <table class="table table-bordered table-striped responsive-utilities">
2136         <thead>
2137           <tr>
2138             <th></th>
2139             <th>
2140               Extra small devices
2141               <small>Phones (&lt;768px)</small>
2142             </th>
2143             <th>
2144               Small devices
2145               <small>Tablets (&ge;768px)</small>
2146             </th>
2147             <th>
2148               Medium devices
2149               <small>Desktops (&ge;992px)</small>
2150             </th>
2151             <th>
2152               Large devices
2153               <small>Desktops (&ge;1200px)</small>
2154             </th>
2155           </tr>
2156         </thead>
2157         <tbody>
2158           <tr>
2159             <th><code>.visible-xs</code></th>
2160             <td class="is-visible">Visible</td>
2161             <td class="is-hidden">Hidden</td>
2162             <td class="is-hidden">Hidden</td>
2163             <td class="is-hidden">Hidden</td>
2164           </tr>
2165           <tr>
2166             <th><code>.visible-sm</code></th>
2167             <td class="is-hidden">Hidden</td>
2168             <td class="is-visible">Visible</td>
2169             <td class="is-hidden">Hidden</td>
2170             <td class="is-hidden">Hidden</td>
2171           </tr>
2172           <tr>
2173             <th><code>.visible-md</code></th>
2174             <td class="is-hidden">Hidden</td>
2175             <td class="is-hidden">Hidden</td>
2176             <td class="is-visible">Visible</td>
2177             <td class="is-hidden">Hidden</td>
2178           </tr>
2179           <tr>
2180             <th><code>.visible-lg</code></th>
2181             <td class="is-hidden">Hidden</td>
2182             <td class="is-hidden">Hidden</td>
2183             <td class="is-hidden">Hidden</td>
2184             <td class="is-visible">Visible</td>
2185           </tr>
2186         </tbody>
2187         <tbody>
2188           <tr>
2189             <th><code>.hidden-xs</code></th>
2190             <td class="is-hidden">Hidden</td>
2191             <td class="is-visible">Visible</td>
2192             <td class="is-visible">Visible</td>
2193             <td class="is-visible">Visible</td>
2194           </tr>
2195           <tr>
2196             <th><code>.hidden-sm</code></th>
2197             <td class="is-visible">Visible</td>
2198             <td class="is-hidden">Hidden</td>
2199             <td class="is-visible">Visible</td>
2200             <td class="is-visible">Visible</td>
2201           </tr>
2202           <tr>
2203             <th><code>.hidden-md</code></th>
2204             <td class="is-visible">Visible</td>
2205             <td class="is-visible">Visible</td>
2206             <td class="is-hidden">Hidden</td>
2207             <td class="is-visible">Visible</td>
2208           </tr>
2209           <tr>
2210             <th><code>.hidden-lg</code></th>
2211             <td class="is-visible">Visible</td>
2212             <td class="is-visible">Visible</td>
2213             <td class="is-visible">Visible</td>
2214             <td class="is-hidden">Hidden</td>
2215           </tr>
2216         </tbody>
2217       </table>
2218     </div>
2219
2220     <h3>Print classes</h3>
2221     <div class="bs-table-scrollable">
2222       <table class="table table-bordered table-striped responsive-utilities">
2223         <thead>
2224           <tr>
2225             <th>Class</th>
2226             <th>Browser</th>
2227             <th>Print</th>
2228           </tr>
2229         </thead>
2230         <tbody>
2231           <tr>
2232             <th><code>.visible-print</code></th>
2233             <td class="is-hidden">Hidden</td>
2234             <td class="is-visible">Visible</td>
2235           </tr>
2236           <tr>
2237             <th><code>.hidden-print</code></th>
2238             <td class="is-visible">Visible</td>
2239             <td class="is-hidden">Hidden</td>
2240           </tr>
2241         </tbody>
2242       </table>
2243     </div>
2244
2245     <h3>When to use</h3>
2246     <p>Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation. Responsive utilities are currently only available for block-level toggling, meaning <code>display: none;</code> or <code>display: block;</code>. Use with inline and table elements is currently not supported.</p>
2247
2248     <h3>Test case</h3>
2249     <p>Resize your browser or load on different devices to test the responsive utility classes.</p>
2250     <h4>Visible on...</h4>
2251     <p>Green checkmarks indicate the element <strong>is visible</strong> in your current viewport.</p>
2252     <div class="row responsive-utilities-test visible-on">
2253       <div class="col-xs-6 col-sm-3">
2254         <span class="hidden-xs">Extra small</span>
2255         <span class="visible-xs">&#10004; Visible on x-small</span>
2256       </div>
2257       <div class="col-xs-6 col-sm-3">
2258         <span class="hidden-sm">Small</span>
2259         <span class="visible-sm">&#10004; Visible on small</span>
2260       </div>
2261       <div class="clearfix visible-xs"></div>
2262       <div class="col-xs-6 col-sm-3">
2263         <span class="hidden-md">Medium</span>
2264         <span class="visible-md">&#10004; Visible on medium</span>
2265       </div>
2266       <div class="col-xs-6 col-sm-3">
2267         <span class="hidden-lg">Large</span>
2268         <span class="visible-lg">&#10004; Visible on large</span>
2269       </div>
2270     </div>
2271     <h4>Hidden on...</h4>
2272     <p>Here, green checkmarks indicate the element <strong>is hidden</strong> in your current viewport.</p>
2273     <div class="row responsive-utilities-test hidden-on">
2274       <div class="col-xs-6 col-sm-3">
2275         <span class="visible-xs">Extra small</span>
2276         <span class="hidden-xs">&#10004; Hidden on x-small</span>
2277       </div>
2278       <div class="col-xs-6 col-sm-3">
2279         <span class="visible-sm">Small</span>
2280         <span class="hidden-sm">&#10004; Hidden on small</span>
2281       </div>
2282       <div class="clearfix visible-xs"></div>
2283       <div class="col-xs-6 col-sm-3">
2284         <span class="visible-md">Medium</span>
2285         <span class="hidden-md">&#10004; Hidden on medium</span>
2286       </div>
2287       <div class="col-xs-6 col-sm-3">
2288         <span class="visible-lg">Large</span>
2289         <span class="hidden-lg">&#10004; Hidden on large</span>
2290       </div>
2291     </div>
2292
2293   </div>