5 lead: "Global CSS settings, fundamental HTML elements styled and enhanced with extensible classes, and an advanced grid system."
10 <!-- Global Bootstrap settings
11 ================================================== -->
12 <div class="bs-docs-section">
13 <div class="page-header">
14 <h1 id="overview">Overview</h1>
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>
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>
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><head></code>.</p>
31 <meta name="viewport" content="width=device-width, initial-scale=1.0">
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>
35 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
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>
41 <img src="..." class="img-responsive" alt="Responsive image">
44 <h3 id="overview-type-links">Typography and links</h3>
45 <p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p>
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>
52 <p>These styles can be found within <code>scaffolding.less</code>.</p>
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>
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>
60 <div class="container">
68 <!-- Glyphicons icon font
69 ================================================== -->
70 <div class="bs-docs-section">
71 <div class="page-header">
72 <h1 id="glyphicons">Glyphicons</h1>
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>
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>
83 ================================================== -->
84 <div class="bs-docs-section">
85 <div class="page-header">
86 <h1 id="grid">Grid system</h1>
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>
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>
93 /* Extra small devices (phones, up to 480px) */
94 /* No media query since this is the default in Bootstrap */
96 /* Small devices (tablets, 768px and up) */
97 @media (min-width: @screen-tablet) { ... }
99 /* Medium devices (desktops, 992px and up) */
100 @media (min-width: @screen-desktop) { ... }
102 /* Large devices (large desktops, 1200px and up) */
103 @media (min-width: @screen-large-desktop) { ... }
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>
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) { ... }
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">
122 <small>Phones (<768px)</small>
126 <small>Tablets (≥768px)</small>
130 <small>Desktops (≥992px)</small>
134 <small>Desktops (≥1200px)</small>
140 <th>Grid behavior</th>
141 <td>Horizontal at all times</td>
142 <td colspan="3">Collapsed to start, horizontal above breakpoints</td>
145 <th>Max container width</th>
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>
159 <th># of columns</th>
160 <td colspan="4">12</td>
163 <th>Max column width</th>
164 <td class="text-muted">Auto</td>
170 <th>Gutter width</th>
171 <td colspan="4">30px (15px on each side of a column)</td>
175 <td colspan="4">Yes</td>
179 <td colspan="1" class="text-muted">N/A</td>
180 <td colspan="3">Yes</td>
183 <th>Column ordering</th>
184 <td class="text-muted">N/A</td>
185 <td colspan="3">Yes</td>
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>
208 <div class="row show-grid">
209 <div class="col-md-8">8</div>
210 <div class="col-md-4">4</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>
217 <div class="row show-grid">
218 <div class="col-md-6">6</div>
219 <div class="col-md-6">6</div>
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>
238 <div class="col-md-8">8</div>
239 <div class="col-md-4">4</div>
242 <div class="col-md-4">4</div>
243 <div class="col-md-4">4</div>
244 <div class="col-md-4">4</div>
247 <div class="col-md-6">6</div>
248 <div class="col-md-6">6</div>
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>
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>
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>
270 <!-- Stack the columns on mobile by making one full-width and the other half-width -->
272 <div class="col-xs-12 col-md-8">8</div>
273 <div class="col-xs-6 col-md-4">4</div>
276 <!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
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>
283 <!-- Columns are always 50% wide, on mobile and desktop -->
285 <div class="col-xs-6 col-md-6">6</div>
286 <div class="col-xs-6 col-md-6">6</div>
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>
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>
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>
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>
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>
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>
326 <!-- Add the extra clearfix for only the required viewport -->
327 <div class="clearfix visible-xs"></div>
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>
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>
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>
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>
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>
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>
358 <div class="row show-grid">
359 <div class="col-md-6 col-md-offset-3">6 offset 3</div>
364 <div class="col-md-4">...</div>
365 <div class="col-md-4 col-md-offset-4">...</div>
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>
372 <div class="col-md-6 col-md-offset-3">...</div>
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">
382 <div class="row show-grid">
383 <div class="col-md-6">
386 <div class="col-md-6">
394 <div class="col-md-9">
397 <div class="col-md-6">
400 <div class="col-md-6">
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>
417 <div class="col-md-9 col-md-push-3">9</div>
418 <div class="col-md-3 col-md-pull-9">3</div>
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>
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>
429 @grid-gutter-width: 30px;
430 @grid-float-breakpoint: 768px;
434 <p>Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns.</p>
436 // Creates a wrapper for a series of columns
437 .make-row(@gutter: @grid-gutter-width) {
438 // Then clear the floated columns
441 @media (min-width: @screen-small) {
442 margin-left: (@gutter / -2);
443 margin-right: (@gutter / -2);
446 // Negative margin nested rows out to align the content of columns
448 margin-left: (@gutter / -2);
449 margin-right: (@gutter / -2);
453 // Generate the extra small columns
454 .make-xs-column(@columns; @gutter: @grid-gutter-width) {
456 // Prevent columns from collapsing when empty
458 // Inner gutter via padding
459 padding-left: (@gutter / 2);
460 padding-right: (@gutter / 2);
462 // Calculate width based on number of columns available
463 @media (min-width: @grid-float-breakpoint) {
465 width: percentage((@columns / @grid-columns));
469 // Generate the small columns
470 .make-sm-column(@columns; @gutter: @grid-gutter-width) {
472 // Prevent columns from collapsing when empty
474 // Inner gutter via padding
475 padding-left: (@gutter / 2);
476 padding-right: (@gutter / 2);
478 // Calculate width based on number of columns available
479 @media (min-width: @screen-small) {
481 width: percentage((@columns / @grid-columns));
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));
491 .make-sm-column-push(@columns) {
492 @media (min-width: @screen-small) {
493 left: percentage((@columns / @grid-columns));
496 .make-sm-column-pull(@columns) {
497 @media (min-width: @screen-small) {
498 right: percentage((@columns / @grid-columns));
502 // Generate the medium columns
503 .make-md-column(@columns; @gutter: @grid-gutter-width) {
505 // Prevent columns from collapsing when empty
507 // Inner gutter via padding
508 padding-left: (@gutter / 2);
509 padding-right: (@gutter / 2);
511 // Calculate width based on number of columns available
512 @media (min-width: @screen-medium) {
514 width: percentage((@columns / @grid-columns));
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));
524 .make-md-column-push(@columns) {
525 @media (min-width: @screen-medium) {
526 left: percentage((@columns / @grid-columns));
529 .make-md-column-pull(@columns) {
530 @media (min-width: @screen-medium) {
531 right: percentage((@columns / @grid-columns));
535 // Generate the large columns
536 .make-lg-column(@columns; @gutter: @grid-gutter-width) {
538 // Prevent columns from collapsing when empty
540 // Inner gutter via padding
541 padding-left: (@gutter / 2);
542 padding-right: (@gutter / 2);
544 // Calculate width based on number of columns available
545 @media (min-width: @screen-large) {
547 width: percentage((@columns / @grid-columns));
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));
557 .make-lg-column-push(@columns) {
558 @media (min-width: @screen-large) {
559 left: percentage((@columns / @grid-columns));
562 .make-lg-column-pull(@columns) {
563 @media (min-width: @screen-large) {
564 right: percentage((@columns / @grid-columns));
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>
580 .make-lg-column-offset(1);
584 <div class="wrapper">
585 <div class="content-main">...</div>
586 <div class="content-secondary">...</div>
596 ================================================== -->
597 <div class="bs-docs-section">
598 <div class="page-header">
599 <h1 id="type">Typography</h1>
603 <h2 id="type-headings">Headings</h2>
604 <p>All HTML headings, <code><h1></code> through <code><h6></code> are available.</p>
606 <div class="bs-example bs-example-type">
607 <table class="table">
610 <td><h1>Bootstrap heading</h1></td>
611 <td>Semibold 38px</td>
614 <td><h2>Bootstrap heading</h2></td>
615 <td>Semibold 32px</td>
618 <td><h3>Bootstrap heading</h3></td>
619 <td>Semibold 24px</td>
622 <td><h4>Bootstrap heading</h4></td>
623 <td>Semibold 18px</td>
626 <td><h5>Bootstrap heading</h5></td>
627 <td>Semibold 14px</td>
630 <td><h6>Bootstrap heading</h6></td>
631 <td>Semibold 12px</td>
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><body></code> and all paragraphs. In addition, <code><p></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>
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>
664 <p class="lead">...</p>
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>
673 <h2 id="type-emphasis">Emphasis</h2>
674 <p>Make use of HTML's default emphasis tags with lightweight styles.</p>
677 <p>For de-emphasizing inline or blocks of text, use the <code><small></code> tag to set text at 85% the size of the parent. Heading elements receive their own <code>font-size</code> for nested <code><small></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>
682 <small>This line of text is meant to be treated as fine print.</small>
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>
692 <strong>rendered as bold text</strong>
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>
701 <em>rendered as italicized text</em>
704 <div class="bs-callout bs-callout-info">
705 <h4>Alternate elements</h4>
706 <p>Feel free to use <code><b></code> and <code><i></code> in HTML5. <code><b></code> is meant to highlight words or phrases without conveying additional importance while <code><i></code> is mostly for voice, technical terms, etc.</p>
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>
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>
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>
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>
742 <!-- Abbreviations -->
743 <h2 id="type-abbreviations">Abbreviations</h2>
744 <p>Stylized implementation of HTML's <code><abbr></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>
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><abbr></code> element.</p>
748 <div class="bs-example">
749 <p>An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.</p>
752 <abbr title="attribute">attr</abbr>
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>
761 <abbr title="HyperText Markup Language" class="initialism">HTML</abbr>
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><br></code>.</p>
768 <div class="bs-example">
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
776 <strong>Full Name</strong><br>
777 <a href="mailto:#">first.last@example.com</a>
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
789 <strong>Full Name</strong><br>
790 <a href="mailto:#">first.last@example.com</a>
796 <h2 id="type-blockquotes">Blockquotes</h2>
797 <p>For quoting blocks of content from another source within your document.</p>
799 <h3>Default blockquote</h3>
800 <p>Wrap <code><blockquote></code> around any <abbr title="HyperText Markup Language">HTML</abbr> as the quote. For straight quotes, we recommend a <code><p></code>.</p>
801 <div class="bs-example">
803 <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
808 <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
812 <h3>Blockquote options</h3>
813 <p>Style and content changes for simple variations on a standard <code><blockquote></code>.</p>
815 <h4>Naming a source</h4>
816 <p>Add <code><small></code> tag for identifying the source. Wrap the name of the source work in <code><cite></code>.</p>
817 <div class="bs-example">
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>
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>
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>
839 <blockquote class="pull-right">
846 <h2 id="type-lists">Lists</h2>
849 <p>A list of items in which the order does <em>not</em> explicitly matter.</p>
850 <div class="bs-example">
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
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>
864 <li>Faucibus porta lacus fringilla vel</li>
865 <li>Aenean sit amet erat nunc</li>
866 <li>Eget porttitor lorem</li>
876 <p>A list of items in which the order <em>does</em> explicitly matter.</p>
877 <div class="bs-example">
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>
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
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>
911 <li>Faucibus porta lacus fringilla vel</li>
912 <li>Aenean sit amet erat nunc</li>
913 <li>Eget porttitor lorem</li>
917 <ul class="list-unstyled">
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">
927 <li>Phasellus iaculis</li>
928 <li>Nulla volutpat</li>
932 <ul class="list-inline">
938 <p>A list of terms with their associated descriptions.</p>
939 <div class="bs-example">
941 <dt>Description lists</dt>
942 <dd>A description list is perfect for defining terms.</dd>
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>
957 <h4>Horizontal description</h4>
958 <p>Make terms and descriptions in <code><dl></code> line up side-by-side. Starts off stacked like default <code><dl></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>
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>
973 <dl class="dl-horizontal">
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>
987 ================================================== -->
988 <div class="bs-docs-section">
989 <div class="page-header">
990 <h1 id="code">Code</h1>
994 <p>Wrap inline snippets of code with <code><code></code>.</p>
995 <div class="bs-example">
996 For example, <code><section></code> should be wrapped as inline.
999 For example, <code><section></code> should be wrapped as inline.
1002 <h2>Basic block</h2>
1003 <p>Use <code><pre></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><p>Sample text here...</p></pre>
1007 {% highlight html %}
1008 <pre><p>Sample text here...</p></pre>
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>
1017 ================================================== -->
1018 <div class="bs-docs-section">
1019 <div class="page-header">
1020 <h1 id="tables">Tables</h1>
1023 <h2 id="tables-example">Basic example</h2>
1024 <p>For basic styling—light padding and only horizontal dividers—add the base class <code>.table</code> to any <code><table></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">
1056 </div><!-- /example -->
1057 {% highlight html %}
1058 <table class="table">
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><tbody></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>
1070 <div class="bs-example">
1071 <table class="table table-striped">
1101 </div><!-- /example -->
1102 {% highlight html %}
1103 <table class="table table-striped">
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">
1123 <td rowspan="2">1</td>
1131 <td>@TwBootstrap</td>
1141 <td colspan="2">Larry the Bird</td>
1146 </div><!-- /example -->
1147 {% highlight html %}
1148 <table class="table table-bordered">
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><tbody></code>.</p>
1156 <div class="bs-example">
1157 <table class="table table-hover">
1181 <td colspan="2">Larry the Bird</td>
1186 </div><!-- /example -->
1187 {% highlight html %}
1188 <table class="table table-hover">
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">
1221 <td colspan="2">Larry the Bird</td>
1226 </div><!-- /example -->
1227 {% highlight html %}
1228 <table class="table table-condensed">
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">
1240 <col class="col-lg-1">
1241 <col class="col-lg-7">
1246 <th>Description</th>
1252 <code>.active</code>
1254 <td>Applies the hover color to a particular row or cell</td>
1258 <code>.success</code>
1260 <td>Indicates a successful or positive action</td>
1264 <code>.warning</code>
1266 <td>Indicates a warning that might need attention</td>
1270 <code>.danger</code>
1272 <td>Indicates a dangerous or potentially negative action</td>
1277 <div class="bs-example">
1278 <table class="table">
1282 <th>Column heading</th>
1283 <th>Column heading</th>
1284 <th>Column heading</th>
1290 <td>Column content</td>
1291 <td>Column content</td>
1292 <td>Column content</td>
1296 <td>Column content</td>
1297 <td>Column content</td>
1298 <td>Column content</td>
1300 <tr class="success">
1302 <td>Column content</td>
1303 <td>Column content</td>
1304 <td>Column content</td>
1308 <td>Column content</td>
1309 <td>Column content</td>
1310 <td>Column content</td>
1312 <tr class="warning">
1314 <td>Column content</td>
1315 <td>Column content</td>
1316 <td>Column content</td>
1320 <td>Column content</td>
1321 <td>Column content</td>
1322 <td>Column content</td>
1326 <td>Column content</td>
1327 <td>Column content</td>
1328 <td>Column content</td>
1332 </div><!-- /example -->
1333 {% highlight html %}
1335 <tr class="active">...</tr>
1336 <tr class="success">...</tr>
1337 <tr class="warning">...</tr>
1338 <tr class="danger">...</tr>
1340 <!-- On cells (`td` or `th`) -->
1342 <td class="active">...</td>
1343 <td class="success">...</td>
1344 <td class="warning">...</td>
1345 <td class="danger">...</td>
1354 ================================================== -->
1355 <div class="bs-docs-section">
1356 <div class="page-header">
1357 <h1 id="forms">Forms</h1>
1360 <h2 id="forms-example">Basic example</h2>
1361 <p>Individual form controls automatically receive some global styling. All textual <code><input></code>, <code><textarea></code>, and <code><select></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">
1367 <div class="form-group">
1368 <label for="exampleInputPassword1">Password</label>
1369 <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
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>
1376 <div class="checkbox">
1378 <input type="checkbox"> Check me out
1381 <button type="submit" class="btn btn-default">Submit</button>
1382 </form><!-- /example -->
1383 {% highlight html %}
1385 <div class="form-group">
1386 <label for="exampleInputEmail1">Email address</label>
1387 <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
1389 <div class="form-group">
1390 <label for="exampleInputPassword1">Password</label>
1391 <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
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>
1398 <div class="checkbox">
1400 <input type="checkbox"> Check me out
1403 <button type="submit" class="btn btn-default">Submit</button>
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>
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>
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">
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">
1427 <div class="checkbox">
1429 <input type="checkbox"> Remember me
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">
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">
1444 <div class="checkbox">
1446 <input type="checkbox"> Remember me
1449 <button type="submit" class="btn btn-default">Sign in</button>
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">
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">
1469 <div class="form-group">
1470 <div class="col-lg-offset-2 col-lg-10">
1471 <div class="checkbox">
1473 <input type="checkbox"> Remember me
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>
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">
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">
1498 <div class="form-group">
1499 <div class="col-lg-offset-2 col-lg-10">
1500 <div class="checkbox">
1502 <input type="checkbox"> Remember me
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>
1516 <h2 id="forms-controls">Supported controls</h2>
1517 <p>Examples of standard form controls supported in an example form layout.</p>
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>
1525 <form class="bs-example">
1526 <input type="text" class="form-control" placeholder="Text input">
1528 {% highlight html %}
1529 <input type="text" class="form-control" placeholder="Text input">
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>
1537 {% highlight html %}
1538 <textarea class="form-control" rows="3"></textarea>
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">
1547 <input type="checkbox" value="">
1548 Option one is this and that—be sure to include why it's great
1554 <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
1555 Option one is this and that—be sure to include why it's great
1560 <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
1561 Option two can be something else and selecting it will deselect option one
1565 {% highlight html %}
1566 <div class="checkbox">
1568 <input type="checkbox" value="">
1569 Option one is this and that—be sure to include why it's great
1575 <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
1576 Option one is this and that—be sure to include why it's great
1581 <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
1582 Option two can be something else and selecting it will deselect option one
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
1593 <label class="checkbox-inline">
1594 <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
1596 <label class="checkbox-inline">
1597 <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
1600 {% highlight html %}
1601 <label class="checkbox-inline">
1602 <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
1604 <label class="checkbox-inline">
1605 <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
1607 <label class="checkbox-inline">
1608 <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
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">
1623 <select multiple class="form-control">
1631 {% highlight html %}
1632 <select class="form-control">
1640 <select multiple class="form-control">
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><p></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>
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">
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>
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">
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>
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...">
1692 {% highlight html %}
1693 <input class="form-control" id="focusedInput" type="text" value="This is focused...">
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>
1701 {% highlight html %}
1702 <input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
1705 <h3 id="forms-disabled-fieldsets">Disabled fieldsets</h3>
1706 <p>Add the <code>disabled</code> attribute to a <code><fieldset></code> to disable all the controls within the <code><fieldset></code> at once.</p>
1708 <div class="bs-callout bs-callout-warning">
1709 <h4>Link functionality of <code><a></code> not impacted</h4>
1710 <p>This class will only change the appearance of <code><a class="btn btn-default"></code> buttons, not their functionality. Use custom JavaScript to disable links here.</p>
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><fieldset></code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
1718 <form class="bs-example">
1720 <div class="form-group">
1721 <label for="disabledTextInput">Disabled input</label>
1722 <input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input">
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>
1730 <div class="checkbox">
1732 <input type="checkbox"> Can't check this
1735 <button type="submit" class="btn btn-primary">Submit</button>
1738 {% highlight html %}
1739 <form class="form-inline" role="form">
1741 <div class="form-group">
1742 <label for="disabledTextInput">Disabled input</label>
1743 <input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input">
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>
1751 <div class="checkbox">
1753 <input type="checkbox"> Can't check this
1756 <button type="submit" class="btn btn-primary">Submit</button>
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>
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">
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">
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">
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">
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">
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">
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>
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">
1805 <select class="form-control input-lg">
1806 <option value="">.input-lg</option>
1808 <select class="form-control">
1809 <option value="">Default select</option>
1811 <select class="form-control input-sm">
1812 <option value="">.input-sm</option>
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">
1821 <select class="form-control input-lg">...</select>
1822 <select class="form-control">...</select>
1823 <select class="form-control input-sm">...</select>
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;">
1830 <div class="col-lg-2">
1831 <input type="text" class="form-control" placeholder=".col-lg-2">
1833 <div class="col-lg-3">
1834 <input type="text" class="form-control" placeholder=".col-lg-3">
1836 <div class="col-lg-4">
1837 <input type="text" class="form-control" placeholder=".col-lg-4">
1841 {% highlight html %}
1843 <div class="col-lg-2">
1844 <input type="text" class="form-control" placeholder=".col-lg-2">
1846 <div class="col-lg-3">
1847 <input type="text" class="form-control" placeholder=".col-lg-3">
1849 <div class="col-lg-4">
1850 <input type="text" class="form-control" placeholder=".col-lg-4">
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>
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>
1870 ================================================== -->
1871 <div class="bs-docs-section">
1872 <div class="page-header">
1873 <h1 id="buttons">Buttons</h1>
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>
1887 {% highlight html %}
1888 <!-- Standard gray button with gradient -->
1889 <button type="button" class="btn btn-default">Default</button>
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>
1894 <!-- Indicates a successful or positive action -->
1895 <button type="button" class="btn btn-success">Success</button>
1897 <!-- Contextual button for informational alert messages -->
1898 <button type="button" class="btn btn-info">Info</button>
1900 <!-- Indicates caution should be taken with this action -->
1901 <button type="button" class="btn btn-warning">Warning</button>
1903 <!-- Indicates a dangerous or potentially negative action -->
1904 <button type="button" class="btn btn-danger">Danger</button>
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>
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">
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>
1918 <button type="button" class="btn btn-primary">Default button</button>
1919 <button type="button" class="btn btn-default">Default button</button>
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>
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>
1930 {% highlight html %}
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>
1936 <button type="button" class="btn btn-primary">Default button</button>
1937 <button type="button" class="btn btn-default">Default button</button>
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>
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>
1949 <p>Create block level buttons—those that span the full width of a parent— 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>
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>
1962 <h2 id="buttons-disabled">Disabled state</h2>
1963 <p>Make buttons look unclickable by fading them back 50%.</p>
1965 <h3>Button element</h3>
1966 <p>Add the <code>disabled</code> attribute to <code><button></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>
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>
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><button></code>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.</p>
1981 <h3>Anchor element</h3>
1982 <p>Add the <code>.disabled</code> class to <code><a></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>
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>
1992 We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required.
1994 <div class="bs-callout bs-callout-warning">
1995 <h4>Link functionality not impacted</h4>
1996 <p>This class will only change the <code><a></code>'s appearance, not its functionality. Use custom JavaScript to disable links here.</p>
2000 <h2 id="buttons-tags">Button tags</h2>
2001 <p>Use the button classes on an <code><a></code>, <code><button></code>, or <code><input></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">
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">
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><button></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><input></code>-based buttons, causing them to not exactly match the height of other buttons on Firefox.</p>
2026 ================================================== -->
2027 <div class="bs-docs-section">
2028 <div class="page-header">
2029 <h1 id="images">Images</h1>
2032 <p>Add classes to an <code><img></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>
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">
2042 {% highlight html %}
2043 <img src="..." alt="..." class="img-rounded">
2044 <img src="..." alt="..." class="img-circle">
2045 <img src="..." alt="..." class="img-thumbnail">
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>
2057 ================================================== -->
2058 <div class="bs-docs-section">
2059 <div class="page-header">
2060 <h1 id="helper-classes">Helper classes</h1>
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">×</button></p>
2068 {% highlight html %}
2069 <button type="button" class="close" aria-hidden="true">×</button>
2073 <p>Float an element left</p>
2074 {% highlight html %}
2075 <div class="pull-left">...</div>
2083 <h3>.pull-right</h3>
2084 <p>Float an element right</p>
2085 {% highlight html %}
2086 <div class="pull-right">...</div>
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>
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>
2125 <!-- Responsive utilities
2126 ================================================== -->
2127 <div class="bs-docs-section" id="responsive-utilities">
2128 <div class="page-header">
2129 <h1>Responsive utilities</h1>
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>
2133 <h3>Responsive classes</h3>
2134 <div class="bs-table-scrollable">
2135 <table class="table table-bordered table-striped responsive-utilities">
2141 <small>Phones (<768px)</small>
2145 <small>Tablets (≥768px)</small>
2149 <small>Desktops (≥992px)</small>
2153 <small>Desktops (≥1200px)</small>
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>
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>
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>
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>
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>
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>
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>
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>
2220 <h3>Print classes</h3>
2221 <div class="bs-table-scrollable">
2222 <table class="table table-bordered table-striped responsive-utilities">
2232 <th><code>.visible-print</code></th>
2233 <td class="is-hidden">Hidden</td>
2234 <td class="is-visible">Visible</td>
2237 <th><code>.hidden-print</code></th>
2238 <td class="is-visible">Visible</td>
2239 <td class="is-hidden">Hidden</td>
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>
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">✔ Visible on x-small</span>
2257 <div class="col-xs-6 col-sm-3">
2258 <span class="hidden-sm">Small</span>
2259 <span class="visible-sm">✔ Visible on small</span>
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">✔ Visible on medium</span>
2266 <div class="col-xs-6 col-sm-3">
2267 <span class="hidden-lg">Large</span>
2268 <span class="visible-lg">✔ Visible on large</span>
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">✔ Hidden on x-small</span>
2278 <div class="col-xs-6 col-sm-3">
2279 <span class="visible-sm">Small</span>
2280 <span class="hidden-sm">✔ Hidden on small</span>
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">✔ Hidden on medium</span>
2287 <div class="col-xs-6 col-sm-3">
2288 <span class="visible-lg">Large</span>
2289 <span class="hidden-lg">✔ Hidden on large</span>