<!DOCTYPE html><htmllang=en><head><metacharset=utf-8><metahttp-equiv=X-UA-Compatiblecontent="IE=edge"><metaname=viewportcontent="width=device-width,initial-scale=1"><metaname=descriptioncontent="Bootstrap, a sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development."><metaname=keywordscontent="HTML, CSS, JS, JavaScript, framework, bootstrap, front-end, frontend, web development"><metaname=authorcontent="Mark Otto, Jacob Thornton, and Bootstrap contributors"><title> CSS · Bootstrap </title><linkhref=../dist/css/bootstrap.min.cssrel=stylesheet><linkhref="data:text/css;charset=utf-8,"data-href=../dist/css/bootstrap-theme.min.cssrel=stylesheetid=bs-theme-stylesheet><linkhref=../assets/css/docs.min.cssrel=stylesheet><!--[if lt IE 9]><script src="../assets/js/ie8-responsive-file-warning.js"></script><![endif]--><scriptsrc=../assets/js/ie-emulation-modes-warning.js></script><!--[if lt IE 9]><script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<scriptsrc="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]--><linkrel=apple-touch-iconhref=/apple-touch-icon.png><linkrel=iconhref=/favicon.ico><script>!function(e,t,a,n,c,o,s){e.GoogleAnalyticsObject=c,e[c]=e[c]||function(){(e[c].q=e[c].q||[]).push(arguments)},e[c].l=1*newDate,o=t.createElement(a),s=t.getElementsByTagName(a)[0],o.async=1,o.src=n,s.parentNode.insertBefore(o,s)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create","UA-146052-10","getbootstrap.com"),ga("send","pageview");</script></head><body><aid=skippyclass="sr-only sr-only-focusable"href=#content><divclass=container><spanclass=skiplink-text>Skip to main content</span></div></a><ahref="http://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/"class="v4-tease">Aww yeah, Bootstrap 4 is coming!</a><headerclass="navbar navbar-static-top bs-docs-nav"id=toprole=banner><divclass=container><divclass=navbar-header><buttonclass="navbar-toggle collapsed"type=buttondata-toggle=collapsedata-target=#bs-navbararia-controls=bs-navbararia-expanded=false><spanclass=sr-only>Toggle navigation</span><spanclass=icon-bar></span><spanclass=icon-bar></span><spanclass=icon-bar></span></button><ahref=../class=navbar-brand>Bootstrap</a></div><navid=bs-navbarclass="collapse navbar-collapse"><ulclass="nav navbar-nav"><li><ahref="../getting-started/">Getting started</a></li><liclass=active><ahref="../css/">CSS</a></li><li><ahref="../components/">Components</a></li><li><ahref="../javascript/">JavaScript</a></li><li><ahref="../customize/">Customize</a></li></ul><ulclass="nav navbar-nav navbar-right"><li><ahref=http://themes.getbootstrap.comonclick="ga("send","event","Navbar","Community links","Themes")">Themes</a></li><li><ahref=http://expo.getbootstrap.comonclick="ga("send","event","Navbar","Community links","Expo")">Expo</a></li><li><ahref=http://blog.getbootstrap.comonclick="ga("send","event","Navbar","Community links","Blog")">Blog</a></li></ul></nav></div></header><divclass=bs-docs-headerid=contenttabindex=-1><divclass=container><h1>CSS</h1><p>Global CSS settings, fundamental HTML elements styled and enhanced with extensible classes, and an advanced grid system.</p><divid=carbonads-container><divclass=carbonad><divid=azcarbon></div><script>varz=document.createElement("script");z.async=!0,z.src="http://engine.carbonads.com/z/32341/azcarbon_2_1_0_HORIZ";vars=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(z,s);</script></div></div></div></div><divclass="container bs-docs-container"><divclass=row><divclass=col-md-9role=main><divclass=bs-docs-section><h1id=overviewclass=page-header>Overview</h1><pclass=lead>Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.</p><h2id=overview-doctype>HTML5 doctype</h2><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><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=cp><!DOCTYPE html></span>
<spanclass=nt></html></span></code></pre></figure><h2id=overview-mobile>Mobile first</h2><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><p>To ensure proper rendering and touch zooming, <strong>add the viewport meta tag</strong> to your <code><head></code>.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><meta</span><spanclass=na>name=</span><spanclass=s>"viewport"</span><spanclass=na>content=</span><spanclass=s>"width=device-width, initial-scale=1"</span><spanclass=nt>></span></code></pre></figure><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><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><meta</span><spanclass=na>name=</span><spanclass=s>"viewport"</span><spanclass=na>content=</span><spanclass=s>"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"</span><spanclass=nt>></span></code></pre></figure><h2id=overview-type-links>Typography and links</h2><p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p><ul><li>Set <code>background-color: #fff;</code> on the <code>body</code></li><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><li>Set the global link color via <code>@link-color</code> and apply link underlines only on <code>:hover</code></li></ul><p>These styles can be found within <code>scaffolding.less</code>.</p><h2id=overview-normalize>Normalize.css</h2><p>For improved cross-browser rendering, we use <ahref=http://necolas.github.io/normalize.css/target=_blank>Normalize.css</a>, a project by <ahref=https://twitter.com/necolastarget=_blank>Nicolas Gallagher</a> and <ahref=https://twitter.com/jon_nealtarget=_blank>Jonathan Neal</a>.</p><h2id=overview-container>Containers</h2><p>Bootstrap requires a containing element to wrap site contents and house our grid system. You may choose one of two containers to use in your projects. Note that, due to <code>padding</code> and more, neither container is nestable.</p><p>Use <code>.container</code> for a responsive fixed width container.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"container"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><p>Use <code>.container-fluid</code> for a full width container, spanning the entire width of your viewport.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"container-fluid"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure></div><divclass=bs-docs-section><h1id=gridclass=page-header>Grid system</h1><pclass=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 <ahref=#grid-example-basic>predefined classes</a> for easy layout options, as well as powerful <ahref=#grid-less>mixins for generating more semantic layouts</a>.</p><h2id=grid-intro>Introduction</h2><p>Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here's how the Bootstrap grid system works:</p><ul><li>Rows must be placed within a <code>.container</code> (fixed-width) or <code>.container-fluid</code> (full-width) for proper alignment and padding.</li><li>Use rows to create horizontal groups of columns.</li><li>Content should be placed within columns, and only columns may be immediate children of rows.</li><li>Predefined grid classes like <code>.row</code> and <code>.col-xs-4</code> are available for quickly making grid layouts. Less mixins can also be used for more semantic layouts.</li><li>Columns create gutters (gaps between column content) via <code>padding</code>. That padding is offset in rows for the first and last column via negative margin on <code>.row</code>s.</li><li>The negative margin is why the examples below are outdented. It's so that content within grid columns is lined up with non-grid content.</li><li>Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns would use three <code>.col-xs-4</code>.</li><li>If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.</li><li>Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, e.g. applying any <code>.col-md-*</code> class to an element will not only affect its styling on medium devices but also on large devices if a <code>.col-lg-*</code> class is not present.</li></ul><p>Look to the examples for applying these principles to your code.</p><h2id=grid-media-queries>Media queries</h2><p>We use the following media queries in our Less files to create the key breakpoints in our grid system.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=cm>/* Extra small devices (phones, less than 768px) */</span>
<spanclass=cm>/* No media query since this is the default in Bootstrap */</span>
<spanclass=cm>/* Small devices (tablets, 768px and up) */</span>
<spanclass=cm>/* Large devices (large desktops, 1200px and up) */</span>
<spanclass=k>@media</span><spanclass=p>(</span><spanclass=n>min-width</span><spanclass=o>:</span><spanclass=o>@</span><spanclass=n>screen-lg-min</span><spanclass=p>)</span><spanclass=p>{</span><spanclass=nc>...</span><spanclass=p>}</span></code></pre></figure><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><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=k>@media</span><spanclass=p>(</span><spanclass=n>max-width</span><spanclass=o>:</span><spanclass=o>@</span><spanclass=n>screen-xs-max</span><spanclass=p>)</span><spanclass=p>{</span><spanclass=nc>...</span><spanclass=p>}</span>
<spanclass=k>@media</span><spanclass=p>(</span><spanclass=n>min-width</span><spanclass=o>:</span><spanclass=o>@</span><spanclass=n>screen-lg-min</span><spanclass=p>)</span><spanclass=p>{</span><spanclass=nc>...</span><spanclass=p>}</span></code></pre></figure><h2id=grid-options>Grid options</h2><p>See how aspects of the Bootstrap grid system work across multiple devices with a handy table.</p><divclass=table-responsive><tableclass="table table-bordered table-striped"><thead><tr><th></th><th> Extra small devices <small>Phones (<768px)</small></th><th> Small devices <small>Tablets (≥768px)</small></th><th> Medium devices <small>Desktops (≥992px)</small></th><th> Large devices <small>Desktops (≥1200px)</small></th></tr></thead><tbody><tr><thclass=text-nowrapscope=row>Grid behavior</th><td>Horizontal at all times</td><tdcolspan=3>Collapsed to start, horizontal above breakpoints</td></tr><tr><thclass=text-nowrapscope=row>Container width</th><td>None (auto)</td><td>750px</td><td>970px</td><td>1170px</td></tr><tr><thclass=text-nowrapscope=row>Class prefix</th><td><code>.col-xs-</code></td><td><code>.col-sm-</code></td><td><code>.col-md-</code></td><td><code>.col-lg-</code></td></tr><tr><thclass=text-nowrapscope=row># of columns</th><tdcolspan=4>12</td></tr><tr><thclass=text-nowrapscope=row>Column width</th><tdclass=text-muted>Auto</td><td>~62px</td><td>~81px</td><td>~97px</td></tr><tr><thclass=text-nowrapscope=row>Gutter width</th><tdcolspan=4>30px (15px on each side of a column)</td></tr><tr><thclass=text-nowrapscope=row>Nestable</th><tdcolspan=4>Yes</td></tr><tr><thclass=text-nowrapscope=row>Offsets</th><tdcolspan=4>Yes</td></tr><tr><thclass=text-nowrapscope=row>Column ordering</th><tdcolspan=4>Yes</td></tr></tbody></table></div><h2id=grid-example-basic>Example: Stacked-to-horizontal</h2><p>Using a single set of <code>.col-md-*</code> grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns in any <code>.row</code>.</p><divclass="row show-grid"><divclass=col-md-1>.col-md-1</div><divclass=col-md-1>.col-md-1</div><divclass=col-md-1>.col-md-1</div><divclass=col-md-1>.col-md-1</div><divclass=col-md-1>.col-md-1</div><divclass=col-md-1>.col-md-1</div><divclass=col-md-1>.col-md-1</div><divclass=col-md-1>.col-md-1</div><divclass=col-md-1>.col-md-1</div><divclass=col-md-1>.col-md-1</div><divclass=col-md-1>.col-md-1</div><divclass=col-md-1>.col-md-1</div></div><divclass="row show-grid"><divclass=col-md-8>.col-md-8</div><divclass=col-md-4>.col-md-4</div></div><divclass="row show-grid"><divclass=col-md-4>.col-md-4</div><divclass=col-md-4>.col-md-4</div><divclass=col-md-4>.col-md-4</div></div><divclass="row show-grid"><divclass=col-md-6>.col-md-6</div><divclass=col-md-6>.col-md-6</div></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"row"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><h2id=grid-example-fluid>Example: Fluid container</h2><p>Turn any fixed-width grid layout into a full-width layout by changing your outermost <code>.container</code> to <code>.container-fluid</code>.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"container-fluid"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><h2id=grid-example-mixed>Example: Mobile and desktop</h2><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><divclass="row show-grid"><divclass="col-xs-12 col-md-8">.col-xs-12 .col-md-8</div><divclass="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div></div><divclass="row show-grid"><divclass="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div><divclass="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div><divclass="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div></div><divclass="row show-grid"><divclass=col-xs-6>.col-xs-6</div><divclass=col-xs-6>.col-xs-6</div></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=c><!-- Stack the columns on mobile by making one full-width and the other half-width --></span>
<spanclass=nt></div></span></code></pre></figure><h2id=grid-example-mixed-complete>Example: Mobile, tablet, desktop</h2><p>Build on the previous example by creating even more dynamic and powerful layouts with tablet <code>.col-sm-*</code> classes.</p><divclass="row show-grid"><divclass="col-xs-12 col-sm-6 col-md-8">.col-xs-12 .col-sm-6 .col-md-8</div><divclass="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div></div><divclass="row show-grid"><divclass="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div><divclass="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div><divclass="clearfix visible-xs-block"></div><divclass="col-xs-6 col-sm-4">.col-xs-6 .col-sm-4</div></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"row"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><h2id=grid-example-wrapping>Example: Column wrapping</h2><p>If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.</p><divclass="row show-grid"><divclass=col-xs-9>.col-xs-9</div><divclass=col-xs-4>.col-xs-4<br>Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.</div><divclass=col-xs-6>.col-xs-6<br>Subsequent columns continue along the new line.</div></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"row"</span><spanclass=nt>></span>
<spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"col-xs-4"</span><spanclass=nt>></span>.col-xs-4<spanclass=nt><br></span>Since 9 + 4 = 13 <spanclass=ni>&gt;</span> 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.<spanclass=nt></div></span>
<spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"col-xs-6"</span><spanclass=nt>></span>.col-xs-6<spanclass=nt><br></span>Subsequent columns continue along the new line.<spanclass=nt></div></span>
<spanclass=nt></div></span></code></pre></figure><h2id=grid-responsive-resets>Responsive column resets</h2><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 <ahref=#responsive-utilities>responsive utility classes</a>.</p><divclass="row show-grid"><divclass="col-xs-6 col-sm-3"> .col-xs-6 .col-sm-3 <br> Resize your viewport or check it out on your phone for an example. </div><divclass="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div><divclass="clearfix visible-xs-block"></div><divclass="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div><divclass="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"row"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><p>In addition to column clearing at responsive breakpoints, you may need to <strong>reset offsets, pushes, or pulls</strong>. See this in action in <ahref="../examples/grid/">the grid example</a>.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"row"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><h2id=grid-offsetting>Offsetting columns</h2><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><divclass="row show-grid"><divclass=col-md-4>.col-md-4</div><divclass="col-md-4 col-md-offset-4">.col-md-4 .col-md-offset-4</div></div><divclass="row show-grid"><divclass="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div><divclass="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div></div><divclass="row show-grid"><divclass="col-md-6 col-md-offset-3">.col-md-6 .col-md-offset-3</div></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"row"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><p>You can also override offsets from lower grid tiers with <code>.col-*-offset-0</code> classes.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"row"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><h2id=grid-nesting>Nesting columns</h2><p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.col-sm-*</code> columns within an existing <code>.col-sm-*</code> column. Nested rows should include a set of columns that add up to 12 or fewer (it is not required that you use all 12 available columns).</p><divclass="row show-grid"><divclass=col-sm-9> Level 1: .col-sm-9 <divclass="row show-grid"><divclass="col-xs-8 col-sm-6"> Level 2: .col-xs-8 .col-sm-6 </div><divclass="col-xs-4 col-sm-6"> Level 2: .col-xs-4 .col-sm-6 </div></div></div></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"row"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><h2id=grid-column-ordering>Column ordering</h2><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><divclass="row show-grid"><divclass="col-md-9 col-md-push-3">.col-md-9 .col-md-push-3</div><divclass="col-md-3 col-md-pull-9">.col-md-3 .col-md-pull-9</div></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"row"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><h2id=grid-less>Less mixins and variables</h2><p>In addition to <ahref=#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><h3>Variables</h3><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><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=k>@grid-columns</span><spanclass=nd>:</span><spanclass=nt>12</span><spanclass=p>;</span>
<spanclass=k>@grid-float-breakpoint</span><spanclass=nd>:</span><spanclass=nt>768px</span><spanclass=p>;</span></code></pre></figure><h3>Mixins</h3><p>Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=c1>// Creates a wrapper for a series of columns
<spanclass=p>}</span></code></pre></figure><h3>Example usage</h3><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><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nc>.wrapper</span><spanclass=p>{</span>
<spanclass=nt></div></span></code></pre></figure></div><divclass=bs-docs-section><h1id=typeclass=page-header>Typography</h1><h2id=type-headings>Headings</h2><p>All HTML headings, <code><h1></code> through <code><h6></code>, are available. <code>.h1</code> through <code>.h6</code> classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.</p><divclass="bs-example bs-example-type"data-example-id=simple-headings><tableclass=table><tbody><tr><td><h1>h1. Bootstrap heading</h1></td><tdclass=type-info>Semibold 36px</td></tr><tr><td><h2>h2. Bootstrap heading</h2></td><tdclass=type-info>Semibold 30px</td></tr><tr><td><h3>h3. Bootstrap heading</h3></td><tdclass=type-info>Semibold 24px</td></tr><tr><td><h4>h4. Bootstrap heading</h4></td><tdclass=type-info>Semibold 18px</td></tr><tr><td><h5>h5. Bootstrap heading</h5></td><tdclass=type-info>Semibold 14px</td></tr><tr><td><h6>h6. Bootstrap heading</h6></td><tdclass=type-info>Semibold 12px</td></tr></tbody></table></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><h1></span>h1. Bootstrap heading<spanclass=nt></h1></span>
<spanclass=nt><h6></span>h6. Bootstrap heading <spanclass=nt><small></span>Secondary text<spanclass=nt></small></h6></span></code></pre></figure><h2id=type-body-copy>Body copy</h2><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><divclass=bs-exampledata-example-id=body-copy><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><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><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></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><p></span>...<spanclass=nt></p></span></code></pre></figure><h3>Lead body copy</h3><p>Make a paragraph stand out by adding <code>.lead</code>.</p><divclass=bs-exampledata-example-id=lead-copy><pclass=lead>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><p</span><spanclass=na>class=</span><spanclass=s>"lead"</span><spanclass=nt>></span>...<spanclass=nt></p></span></code></pre></figure><h3>Built with Less</h3><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><h2id=type-inline-text>Inline text elements</h2><h3>Marked text</h3><p>For highlighting a run of text due to its relevance in another context, use the <code><mark></code> tag.</p><divclass=bs-exampledata-example-id=simple-mark><p>You can use the mark tag to <mark>highlight</mark> text.</p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html>You can use the mark tag to <spanclass=nt><mark></span>highlight<spanclass=nt></mark></span> text.</code></pre></figure><h3>Deleted text</h3><p>For indicating blocks of text that have been deleted use the <code><del></code> tag.</p><divclass=bs-exampledata-example-id=simple-del><p><del>This line of text is meant to be treated as deleted text.</del></p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><del></span>This line of text is meant to be treated as deleted text.<spanclass=nt></del></span></code></pre></figure><h3>Strikethrough text</h3><p>For indicating blocks of text that are no longer relevant use the <code><s></code> tag.</p><divclass=bs-exampledata-example-id=simple-s><p><s>This line of text is meant to be treated as no longer accurate.</s></p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><s></span>This line of text is meant to be treated as no longer accurate.<spanclass=nt></s></span></code></pre></figure><h3>Inserted text</h3><p>For indicating additions to the document use the <code><ins></code> tag.</p><divclass=bs-exampledata-example-id=simple-ins><p><ins>This line of text is meant to be treated as an additi
<spanclass=nt><p</span><spanclass=na>class=</span><spanclass=s>"text-nowrap"</span><spanclass=nt>></span>No wrap text.<spanclass=nt></p></span></code></pre></figure><h2id=type-transformation>Transformation classes</h2><p>Transform text in components with text capitalization classes.</p><divclass=bs-exampledata-example-id=text-capitalization><pclass=text-lowercase>Lowercased text.</p><pclass=text-uppercase>Uppercased text.</p><pclass=text-capitalize>Capitalized text.</p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><p</span><spanclass=na>class=</span><spanclass=s>"text-lowercase"</span><spanclass=nt>></span>Lowercased text.<spanclass=nt></p></span>
<spanclass=nt><p</span><spanclass=na>class=</span><spanclass=s>"text-capitalize"</span><spanclass=nt>></span>Capitalized text.<spanclass=nt></p></span></code></pre></figure><h2id=type-abbreviations>Abbreviations</h2><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 and to users of assistive technologies.</p><h3>Basic abbreviation</h3><divclass=bs-exampledata-example-id=simple-abbr><p>An abbreviation of the word attribute is <abbrtitle=attribute>attr</abbr>.</p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><abbr</span><spanclass=na>title=</span><spanclass=s>"attribute"</span><spanclass=nt>></span>attr<spanclass=nt></abbr></span></code></pre></figure><h3>Initialism</h3><p>Add <code>.initialism</code> to an abbreviation for a slightly smaller font-size.</p><divclass=bs-exampledata-example-id=simple-initialism><p><abbrtitle="HyperText Markup Language"class=initialism>HTML</abbr> is the best thing since sliced bread.</p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><abbr</span><spanclass=na>title=</span><spanclass=s>"HyperText Markup Language"</span><spanclass=na>class=</span><spanclass=s>"initialism"</span><spanclass=nt>></span>HTML<spanclass=nt></abbr></span></code></pre></figure><h2id=type-addresses>Addresses</h2><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><divclass=bs-exampledata-example-id=simple-address><address><strong>Twitter, Inc.</strong><br> 1355 Market Street, Suite 900<br> San Francisco, CA 94103<br><abbrtitle=Phone>P:</abbr> (123) 456-7890 </address><address><strong>Full Name</strong><br><ahref=mailto:#>first.last@example.com</a></address></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><address></span>
<spanclass=nt></address></span></code></pre></figure><h2id=type-blockquotes>Blockquotes</h2><p>For quoting blocks of content from another source within your document.</p><h3>Default blockquote</h3><p>Wrap <code><blockquote></code> around any <abbrtitle="HyperText Markup Language">HTML</abbr> as the quote. For straight quotes, we recommend a <code><p></code>.</p><divclass=bs-exampledata-example-id=simple-blockquote><blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p></blockquote></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><blockquote></span>
<spanclass=nt><p></span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.<spanclass=nt></p></span>
<spanclass=nt></blockquote></span></code></pre></figure><h3>Blockquote options</h3><p>Style and content changes for simple variations on a standard <code><blockquote></code>.</p><h4>Naming a source</h4><p>Add a <code><footer></code> for identifying the source. Wrap the name of the source work in <code><cite></code>.</p><divclass=bs-exampledata-example-id=blockquote-cite><blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p><footer>Someone famous in <citetitle="Source Title">Source Title</cite></footer></blockquote></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><blockquote></span>
<spanclass=nt><p></span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.<spanclass=nt></p></span>
<spanclass=nt><footer></span>Someone famous in <spanclass=nt><cite</span><spanclass=na>title=</span><spanclass=s>"Source Title"</span><spanclass=nt>></span>Source Title<spanclass=nt></cite></footer></span>
<spanclass=nt></blockquote></span></code></pre></figure><h4>Alternate displays</h4><p>Add <code>.blockquote-reverse</code> for a blockquote with right-aligned content.</p><divclass=bs-examplestyle=overflow:hiddendata-example-id=blockquote-reverse><blockquoteclass=blockquote-reverse><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p><footer>Someone famous in <citetitle="Source Title">Source Title</cite></footer></blockquote></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><blockquote</span><spanclass=na>class=</span><spanclass=s>"blockquote-reverse"</span><spanclass=nt>></span>
<spanclass=nt></blockquote></span></code></pre></figure><h2id=type-lists>Lists</h2><h3>Unordered</h3><p>A list of items in which the order does <em>not</em> explicitly matter.</p><divclass=bs-exampledata-example-id=simple-ul><ul><li>Lorem ipsum dolor sit amet</li><li>Consectetur adipiscing elit</li><li>Integer molestie lorem at massa</li><li>Facilisis in pretium nisl aliquet</li><li>Nulla volutpat aliquam velit <ul><li>Phasellus iaculis neque</li><li>Purus sodales ultricies</li><li>Vestibulum laoreet porttitor sem</li><li>Ac tristique libero volutpat at</li></ul></li><li>Faucibus porta lacus fringilla vel</li><li>Aenean sit amet erat nunc</li><li>Eget porttitor lorem</li></ul></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><ul></span>
<spanclass=nt></ul></span></code></pre></figure><h3>Ordered</h3><p>A list of items in which the order <em>does</em> explicitly matter.</p><divclass=bs-exampledata-example-id=simple-ol><ol><li>Lorem ipsum dolor sit amet</li><li>Consectetur adipiscing elit</li><li>Integer molestie lorem at massa</li><li>Facilisis in pretium nisl aliquet</li><li>Nulla volutpat aliquam velit</li><li>Faucibus porta lacus fringilla vel</li><li>Aenean sit amet erat nunc</li><li>Eget porttitor lorem</li></ol></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><ol></span>
<spanclass=nt></ol></span></code></pre></figure><h3>Unstyled</h3><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><divclass=bs-exampledata-example-id=unstyled-list><ulclass=list-unstyled><li>Lorem ipsum dolor sit amet</li><li>Consectetur adipiscing elit</li><li>Integer molestie lorem at massa</li><li>Facilisis in pretium nisl aliquet</li><li>Nulla volutpat aliquam velit <ul><li>Phasellus iaculis neque</li><li>Purus sodales ultricies</li><li>Vestibulum laoreet porttitor sem</li><li>Ac tristique libero volutpat at</li></ul></li><li>Faucibus porta lacus fringilla vel</li><li>Aenean sit amet erat nunc</li><li>Eget porttitor lorem</li></ul></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><ul</span><spanclass=na>class=</span><spanclass=s>"list-unstyled"</span><spanclass=nt>></span>
<spanclass=nt></ul></span></code></pre></figure><h3>Inline</h3><p>Place all list items on a single line with <code>display: inline-block;</code> and some light padding.</p><divclass=bs-exampledata-example-id=list-inline><ulclass=list-inline><li>Lorem ipsum</li><li>Phasellus iaculis</li><li>Nulla volutpat</li></ul></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><ul</span><spanclass=na>class=</span><spanclass=s>"list-inline"</span><spanclass=nt>></span>
<spanclass=nt></ul></span></code></pre></figure><h3>Description</h3><p>A list of terms with their associated descriptions.</p><divclass=bs-exampledata-example-id=simple-dl><dl><dt>Description lists</dt><dd>A description list is perfect for defining terms.</dd><dt>Euismod</dt><dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd><dd>Donec id elit non mi porta gravida at eget metus.</dd><dt>Malesuada porta</dt><dd>Etiam porta sem malesuada magna mollis euismod.</dd></dl></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><dl></span>
<spanclass=nt></dl></span></code></pre></figure><h4>Horizontal description</h4><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><divclass=bs-exampledata-example-id=horizontal-dl><dlclass=dl-horizontal><dt>Description lists</dt><dd>A description list is perfect for defining terms.</dd><dt>Euismod</dt><dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd><dd>Donec id elit non mi porta gravida at eget metus.</dd><dt>Malesuada porta</dt><dd>Etiam porta sem malesuada magna mollis euismod.</dd><dt>Felis euismod semper eget lacinia</dt><dd>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd></dl></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><dl</span><spanclass=na>class=</span><spanclass=s>"dl-horizontal"</span><spanclass=nt>></span>
<spanclass=nt></dl></span></code></pre></figure><divclass="bs-callout bs-callout-info"id=callout-type-dl-truncate><h4>Auto-truncating</h4><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></div></div><divclass=bs-docs-section><h1id=codeclass=page-header>Code</h1><h2id=code-inline>Inline</h2><p>Wrap inline snippets of code with <code><code></code>.</p><divclass=bs-exampledata-example-id=inline-code> For example, <code><section></code> should be wrapped as inline. </div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html>For example, <spanclass=nt><code></span><spanclass=ni>&lt;</span>section<spanclass=ni>&gt;</span><spanclass=nt></code></span> should be wrapped as inline.</code></pre></figure><h2id=code-user-input>User input</h2><p>Use the <code><kbd></code> to indicate input that is typically entered via keyboard.</p><divclass=bs-exampledata-example-id=simple-kbd> To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br> To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html>To switch directories, type <spanclass=nt><kbd></span>cd<spanclass=nt></kbd></span> followed by the name of the directory.<spanclass=nt><br></span>
To edit settings, press <spanclass=nt><kbd><kbd></span>ctrl<spanclass=nt></kbd></span> + <spanclass=nt><kbd></span>,<spanclass=nt></kbd></kbd></span></code></pre></figure><h2id=code-block>Basic block</h2><p>Use <code><pre></code> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.</p><divclass=bs-exampledata-example-id=simple-pre><pre><p>Sample text here...</p></pre></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><pre></span><spanclass=ni>&lt;</span>p<spanclass=ni>&gt;</span>Sample text here...<spanclass=ni>&lt;</span>/p<spanclass=ni>&gt;</span><spanclass=nt></pre></span></code></pre></figure><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><h2id=code-variables>Variables</h2><p>For indicating variables use the <code><var></code> tag.</p><divclass=bs-exampledata-example-id=simple-var><p><var>y</var> = <var>m</var><var>x</var> + <var>b</var></p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><var></span>y<spanclass=nt></var></span> = <spanclass=nt><var></span>m<spanclass=nt></var><var></span>x<spanclass=nt></var></span> + <spanclass=nt><var></span>b<spanclass=nt></var></span></code></pre></figure><h2id=code-sample-output>Sample output</h2><p>For indicating blocks sample output from a program use the <code><samp></code> tag.</p><divclass=bs-exampledata-example-id=simple-samp><p><samp>This text is meant to be treated as sample output from a computer program.</samp></p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><samp></span>This text is meant to be treated as sample output from a computer program.<spanclass=nt></samp></span></code></pre></figure></div><divclass=bs-docs-section><h1id=tablesclass=page-header>Tables</h1><h2id=tables-example>Basic example</h2><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><divclass=bs-exampledata-example-id=simple-table><tableclass=table><caption>Optional table caption.</caption><thead><tr><th>#</th><th>First Name</th><th>Last Name</th><th>Username</th></tr></thead><tbody><tr><thscope=row>1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope=row>2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope=row>3</th><td>Larry</td><td>the Bird</td><td>@twitter</td></tr></tbody></table></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><table</span><spanclass=na>class=</span><spanclass=s>"table"</span><spanclass=nt>></span>
<spanclass=nt></table></span></code></pre></figure><h2id=tables-striped>Striped rows</h2><p>Use <code>.table-striped</code> to add zebra-striping to any table row within the <code><tbody></code>.</p><divclass="bs-callout bs-callout-danger"id=callout-tables-striped-ie8><h4>Cross-browser compatibility</h4><p>Striped tables are styled via the <code>:nth-child</code> CSS selector, which is not available in Internet Explorer 8.</p></div><divclass=bs-exampledata-example-id=striped-table><tableclass="table table-striped"><thead><tr><th>#</th><th>First Name</th><th>Last Name</th><th>Username</th></tr></thead><tbody><tr><thscope=row>1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope=row>2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope=row>3</th><td>Larry</td><td>the Bird</td><td>@twitter</td></tr></tbody></table></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><table</span><spanclass=na>class=</span><spanclass=s>"table table-striped"</span><spanclass=nt>></span>
<spanclass=nt></table></span></code></pre></figure><h2id=tables-bordered>Bordered table</h2><p>Add <code>.table-bordered</code> for borders on all sides of the table and cells.</p><divclass=bs-exampledata-example-id=bordered-table><tableclass="table table-bordered"><thead><tr><th>#</th><th>First Name</th><th>Last Name</th><th>Username</th></tr></thead><tbody><tr><thscope=row>1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope=row>2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope=row>3</th><td>Larry</td><td>the Bird</td><td>@twitter</td></tr></tbody></table></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><table</span><spanclass=na>class=</span><spanclass=s>"table table-bordered"</span><spanclass=nt>></span>
<spanclass=nt></table></span></code></pre></figure><h2id=tables-hover-rows>Hover rows</h2><p>Add <code>.table-hover</code> to enable a hover state on table rows within a <code><tbody></code>.</p><divclass=bs-exampledata-example-id=hoverable-table><tableclass="table table-hover"><thead><tr><th>#</th><th>First Name</th><th>Last Name</th><th>Username</th></tr></thead><tbody><tr><thscope=row>1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope=row>2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope=row>3</th><td>Larry</td><td>the Bird</td><td>@twitter</td></tr></tbody></table></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><table</span><spanclass=na>class=</span><spanclass=s>"table table-hover"</span><spanclass=nt>></span>
<spanclass=nt></table></span></code></pre></figure><h2id=tables-condensed>Condensed table</h2><p>Add <code>.table-condensed</code> to make tables more compact by cutting cell padding in half.</p><divclass=bs-exampledata-example-id=condensed-table><tableclass="table table-condensed"><thead><tr><th>#</th><th>First Name</th><th>Last Name</th><th>Username</th></tr></thead><tbody><tr><thscope=row>1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope=row>2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope=row>3</th><tdcolspan=2>Larry the Bird</td><td>@twitter</td></tr></tbody></table></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><table</span><spanclass=na>class=</span><spanclass=s>"table table-condensed"</span><spanclass=nt>></span>
<spanclass=nt></table></span></code></pre></figure><h2id=tables-contextual-classes>Contextual classes</h2><p>Use contextual classes to color table rows or individual cells.</p><divclass=table-responsive><tableclass="table table-bordered table-striped"><colgroup><colclass=col-xs-1><colclass=col-xs-7></colgroup><thead><tr><th>Class</th><th>Description</th></tr></thead><tbody><tr><thscope=row><code>.active</code></th><td>Applies the hover color to a particular row or cell</td></tr><tr><thscope=row><code>.success</code></th><td>Indicates a successful or positive action</td></tr><tr><thscope=row><code>.info</code></th><td>Indicates a neutral informative change or action</td></tr><tr><thscope=row><code>.warning</code></th><td>Indicates a warning that might need attention</td></tr><tr><thscope=row><code>.danger</code></th><td>Indicates a dangerous or potentially negative action</td></tr></tbody></table></div><divclass=bs-exampledata-example-id=contextual-table><tableclass=table><thead><tr><th>#</th><th>Column heading</th><th>Column heading</th><th>Column heading</th></tr></thead><tbody><trclass=active><thscope=row>1</th><td>Column content</td><td>Column content</td><td>Column content</td></tr><tr><thscope=row>2</th><td>Column content</td><td>Column content</td><td>Column content</td></tr><trclass=success><thscope=row>3</th><td>Column content</td><td>Column content</td><td>Column content</td></tr><tr><thscope=row>4</th><td>Column content</td><td>Column content</td><td>Column content</td></tr><trclass=info><thscope=row>5</th><td>Column content</td><td>Column content</td><td>Column content</td></tr><tr><thscope=row>6</th><td>Column content</td><td>Column content</td><td>Column content</td></tr><trclass=warning><thscope=row>7</th><td>Column content</td><td>Column content</td><td>Column content</td></tr><tr><thscope=row>8</th><td>Column content</td><td>Column content</td><td>Column content</td></tr><trclass=danger><thscope=row>9</th><td>Column content</td><td>Column content</td><td>Column content</td></tr></tbody></table></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=c><!-- On rows --></span>
<spanclass=nt></tr></span></code></pre></figure><divclass="bs-callout bs-callout-warning"id=callout-tables-context-accessibility><h4>Conveying meaning to assistive technologies</h4><p>Using color to add meaning to a table row or individual cell only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the visible text in the relevant table row/cell), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p></div><h2id=tables-responsive>Responsive tables</h2><p>Create responsive tables by wrapping any <code>.table</code> in <code>.table-responsive</code> to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.</p><divclass="bs-callout bs-callout-warning"id=callout-tables-responsive-overflow><h4>Vertical clipping/truncation</h4><p>Responsive tables make use of <code>overflow-y: hidden</code>, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets.</p></div><divclass="bs-callout bs-callout-warning"id=callout-tables-responsive-ff-fieldset><h4>Firefox and fieldsets</h4><p>Firefox has some awkward fieldset styling involving <code>width</code> that interferes with the responsive table. This cannot be overriden without a Firefox-specific hack that we <strong>don't</strong> provide in Bootstrap:</p><figureclass=highlight><pre><codeclass=language-cssdata-lang=css><spanclass=k>@-moz-document</span><spanclass=n>url-prefix</span><spanclass=p>()</span><spanclass=p>{</span>
<spanclass=nt></div></span></code></pre></figure></div><divclass=bs-docs-section><h1id=formsclass=page-header>Forms</h1><h2id=forms-example>Basic example</h2><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><divclass=bs-exampledata-example-id=basic-forms><form><divclass=form-group><labelfor=exampleInputEmail1>Email address</label><inputtype=emailclass=form-controlid=exampleInputEmail1placeholder=Email></div><divclass=form-group><labelfor=exampleInputPassword1>Password</label><inputtype=passwordclass=form-controlid=exampleInputPassword1placeholder=Password></div><divclass=form-group><labelfor=exampleInputFile>File input</label><inputtype=fileid=exampleInputFile><pclass=help-block>Example block-level help text here.</p></div><divclass=checkbox><label><inputtype=checkbox> Check me out </label></div><buttontype=submitclass="btn btn-default">Submit</button></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><form></span>
<spanclass=nt><p</span><spanclass=na>class=</span><spanclass=s>"help-block"</span><spanclass=nt>></span>Example block-level help text here.<spanclass=nt></p></span>
<spanclass=nt></form></span></code></pre></figure><divclass="bs-callout bs-callout-warning"id=callout-formgroup-inputgroup><h4>Don't mix form groups with input groups</h4><p>Do not mix form groups directly with <ahref=/components/#input-groups>input groups</a>. Instead, nest the input group inside of the form group.</p></div><h2id=forms-inline>Inline form</h2><p>Add <code>.form-inline</code> to your form (which doesn't have to be a <code><form></code>) for left-aligned and inline-block controls. <strong>This only applies to forms within viewports that are at least 768px wide.</strong></p><divclass="bs-callout bs-callout-danger"id=callout-inline-form-width><h4>May require custom widths</h4><p>Inputs and selects have <code>width: 100%;</code> applied by default in Bootstrap. Within inline forms, we reset that to <code>width: auto;</code> so multiple controls can reside on the same line. Depending on your layout, additional custom widths may be required.</p></div><divclass="bs-callout bs-callout-warning"id=callout-inline-form-labels><h4>Always add labels</h4><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. There are further alternative methods of providing a label for assistive technologies, such as the <code>aria-label</code>, <code>aria-labelledby</code> or <code>title</code> attribute. If none of these is present, screen readers may resort to using the <code>placeholder</code> attribute, if present, but note that use of <code>placeholder</code> as a replacement for other labelling methods is not advised.</p></div><divclass=bs-exampledata-example-id=simple-form-inline><formclass=form-inline><divclass=form-group><labelfor=exampleInputName2>Name</label><inputtype=textclass=form-controlid=exampleInputName2placeholder="Jane Doe"></div><divclass=form-group><labelfor=exampleInputEmail2>Email</label><inputtype=emailclass=form-controlid=exampleInputEmail2placeholder=jane.doe@example.com></div><buttontype=submitclass="btn btn-default">Send invitation</button></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><form</span><spanclass=na>class=</span><spanclass=s>"form-inline"</span><spanclass=nt>></span>
<spanclass=nt></form></span></code></pre></figure><divclass=bs-exampledata-example-id=form-inline-with-input-group><formclass=form-inline><divclass=form-group><labelclass=sr-onlyfor=exampleInputAmount>Amount (in dollars)</label><divclass=input-group><divclass=input-group-addon>$</div><inputtype=textclass=form-controlid=exampleInputAmountplaceholder=Amount><divclass=input-group-addon>.00</div></div></div><buttontype=submitclass="btn btn-primary">Transfer cash</button></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><form</span><spanclass=na>class=</span><spanclass=s>"form-inline"</span><spanclass=nt>></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"sr-only"</span><spanclass=na>for=</span><spanclass=s>"exampleInputAmount"</span><spanclass=nt>></span>Amount (in dollars)<spanclass=nt></label></span>
<spanclass=nt></form></span></code></pre></figure><h2id=forms-horizontal>Horizontal form</h2><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 (which doesn't have to be a <code><form></code>). Doing so changes <code>.form-group</code>s to behave as grid rows, so no need for <code>.row</code>.</p><divclass=bs-exampledata-example-id=simple-horizontal-form><formclass=form-horizontal><divclass=form-group><labelfor=inputEmail3class="col-sm-2 control-label">Email</label><divclass=col-sm-10><inputtype=emailclass=form-controlid=inputEmail3placeholder=Email></div></div><divclass=form-group><labelfor=inputPassword3class="col-sm-2 control-label">Password</label><divclass=col-sm-10><inputtype=passwordclass=form-controlid=inputPassword3placeholder=Password></div></div><divclass=form-group><divclass="col-sm-offset-2 col-sm-10"><divclass=checkbox><label><inputtype=checkbox> Remember me </label></div></div></div><divclass=form-group><divclass="col-sm-offset-2 col-sm-10"><buttontype=submitclass="btn btn-default">Sign in</button></div></div></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><form</span><spanclass=na>class=</span><spanclass=s>"form-horizontal"</span><spanclass=nt>></span>
<spanclass=nt></form></span></code></pre></figure><h2id=forms-controls>Supported controls</h2><p>Examples of standard form controls supported in an example form layout.</p><h3>Inputs</h3><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><divclass="bs-callout bs-callout-danger"id=callout-input-needs-type><h4>Type declaration required</h4><p>Inputs will only be fully styled if their <code>type</code> is properly declared.</p></div><divclass=bs-exampledata-example-id=text-form-control><form><inputtype=textclass=form-controlplaceholder="Text input"></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><input</span><spanclass=na>type=</span><spanclass=s>"text"</span><spanclass=na>class=</span><spanclass=s>"form-control"</span><spanclass=na>placeholder=</span><spanclass=s>"Text input"</span><spanclass=nt>></span></code></pre></figure><divclass="bs-callout bs-callout-info"id=callout-xref-input-group><h4>Input groups</h4><p>To add integrated text or buttons before and/or after any text-based <code><input></code>, <ahref=../components/#input-groups>check out the input group component</a>.</p></div><h3>Textarea</h3><p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p><divclass=bs-exampledata-example-id=textarea-form-control><form><textareaclass=form-controlrows=3placeholder=Textarea></textarea></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><textarea</span><spanclass=na>class=</span><spanclass=s>"form-control"</span><spanclass=na>rows=</span><spanclass=s>"3"</span><spanclass=nt>></textarea></span></code></pre></figure><h3>Checkboxes and radios</h3><p>Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many.</p><p>Disabled checkboxes and radios are supported, but to provide a "not-allowed" cursor on hover of the parent <code><label></code>, you'll need to add the <code>.disabled</code> class to the parent <code>.radio</code>, <code>.radio-inline</code>, <code>.checkbox</code>, or <code>.checkbox-inline</code>.</p><h4>Default (stacked)</h4><divclass=bs-exampledata-example-id=block-checkboxes-radios><form><divclass=checkbox><label><inputtype=checkboxvalue=""> Option one is this and that—be sure to include why it's great </label></div><divclass="checkbox disabled"><label><inputtype=checkboxvalue=""disabled=disabled> Option two is disabled </label></div><br><divclass=radio><label><inputtype=radioname=optionsRadiosid=optionsRadios1value=option1checked=checked> Option one is this and that—be sure to include why it's great </label></div><divclass=radio><label><inputtype=radioname=optionsRadiosid=optionsRadios2value=option2> Option two can be something else and selecting it will deselect option one </label></div><divclass="radio disabled"><label><inputtype=radioname=optionsRadiosid=optionsRadios3value=option3disabled=disabled> Option three is disabled </label></div></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"checkbox"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><h4>Inline checkboxes and radios</h4><p>Use the <code>.checkbox-inline</code> or <code>.radio-inline</code> classes on a series of checkboxes or radios for controls that appear on the same line.</p><divclass=bs-exampledata-example-id=inline-checkboxes-radios><form><labelclass=checkbox-inline><inputtype=checkboxid=inlineCheckbox1value=option1> 1 </label><labelclass=checkbox-inline><inputtype=checkboxid=inlineCheckbox2value=option2> 2 </label><labelclass=checkbox-inline><inputtype=checkboxid=inlineCheckbox3value=option3> 3 </label></form><br><form><labelclass=radio-inline><inputtype=radioname=inlineRadioOptionsid=inlineRadio1value=option1> 1 </label><labelclass=radio-inline><inputtype=radioname=inlineRadioOptionsid=inlineRadio2value=option2> 2 </label><labelclass=radio-inline><inputtype=radioname=inlineRadioOptionsid=inlineRadio3value=option3> 3 </label></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"checkbox-inline"</span><spanclass=nt>></span>
<spanclass=nt></label></span></code></pre></figure><h4>Checkboxes and radios without label text</h4><p>Should you have no text within the <code><label></code>, the input is positioned as you'd expect. <strong>Currently only works on non-inline checkboxes and radios.</strong> Remember to still provide some form of label for assistive technologies (for instance, using <code>aria-label</code>).</p><divclass=bs-exampledata-example-id=checkboxes-radios-without-labels><form><divclass=checkbox><label><inputtype=checkboxid=blankCheckboxvalue=option1aria-label="Checkbox without label text"></label></div><divclass=radio><label><inputtype=radioname=blankRadioid=blankRadio1value=option1aria-label="Radio button without label text"></label></div></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"checkbox"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><h3>Selects</h3><p>Note that many native select menus—namely in Safari and Chrome—have rounded corners that cannot be modified via <code>border-radius</code> properties.</p><divclass=bs-exampledata-example-ids=select-form-control><form><selectclass=form-control><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option></select></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><select</span><spanclass=na>class=</span><spanclass=s>"form-control"</span><spanclass=nt>></span>
<spanclass=nt></select></span></code></pre></figure><p>For <code><select></code> controls with the <code>multiple</code> attribute, multiple options are shown by default.</p><divclass=bs-exampledata-example-ids=select-multiple-form-control><form><selectmultiple=multipleclass=form-control><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option></select></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><select</span><spanclass=na>multiple</span><spanclass=na>class=</span><spanclass=s>"form-control"</span><spanclass=nt>></span>
<spanclass=nt></select></span></code></pre></figure><h2id=forms-controls-static>Static control</h2><p>When you need to place plain text next to a form label within a form, use the <code>.form-control-static</code> class on a <code><p></code>.</p><divclass=bs-exampledata-example-id=horizontal-static-form-control><formclass=form-horizontal><divclass=form-group><labelclass="col-sm-2 control-label">Email</label><divclass=col-sm-10><pclass=form-control-static>email@example.com</p></div></div><divclass=form-group><labelfor=inputPasswordclass="col-sm-2 control-label">Password</label><divclass=col-sm-10><inputtype=passwordclass=form-controlid=inputPasswordplaceholder=Password></div></div></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><form</span><spanclass=na>class=</span><spanclass=s>"form-horizontal"</span><spanclass=nt>></span>
<spanclass=nt></form></span></code></pre></figure><h2id=forms-control-focus>Focus state</h2><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><divclass=bs-example><form><inputclass=form-controlid=focusedInputtype=textvalue="Demonstrative focus state"></form></div><divclass="bs-callout bs-callout-info"id=callout-focus-demo><h4>Demo <code>:focus</code> state</h4><p>The above example input uses custom styles in our documentation to demonstrate the <code>:focus</code> state on a <code>.form-control</code>.</p></div><h2id=forms-control-disabled>Disabled state</h2><p>Add the <code>disabled</code> boolean attribute on an input to prevent user interactions. Disabled inputs appear lighter and add a <code>not-allowed</code> cursor.</p><divclass=bs-exampledata-example-id=text-form-control-disabled><form><inputclass=form-controlid=disabledInputtype=textplaceholder="Disabled input here…"disabled=disabled></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><input</span><spanclass=na>class=</span><spanclass=s>"form-control"</span><spanclass=na>id=</span><spanclass=s>"disabledInput"</span><spanclass=na>type=</span><spanclass=s>"text"</span><spanclass=na>placeholder=</span><spanclass=s>"Disabled input here..."</span><spanclass=na>disabled</span><spanclass=nt>></span></code></pre></figure><h3id=forms-disabled-fieldsets>Disabled fieldsets</h3><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><divclass="bs-callout bs-callout-warning"id=callout-fieldset-disabled-pointer-events><h4>Caveat about link functionality of <code><a></code></h4><p>By default, browsers will treat all native form controls (<code><input></code>, <code><select></code> and <code><button></code> elements) inside a <code><fieldset disabled></code> as disabled, preventing both keyboard and mouse interactions on them. However, if your form also includes <code><a ... class="btn btn-*"></code> elements, these will only be given a style of <code>pointer-events: none</code>. As noted in the section about <ahref=#buttons-disabled>disabled state for buttons</a> (and specifically in the sub-section for anchor elements), this CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11, and won't prevent keyboard users from being able to focus or activate these links. So to be safe, use custom JavaScript to disable such links.</p></div><divclass="bs-callout bs-callout-danger"id=callout-fieldset-disabled-ie><h4>Cross-browser compatibility</h4><p>While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below don't fully support the <code>disabled</code> attribute on a <code><fieldset></code>. Use custom JavaScript to disable the fieldset in these browsers.</p></div><divclass=bs-exampledata-example-id=disabled-fieldset><form><fieldsetdisabled=disabled><divclass=form-group><labelfor=disabledTextInput>Disabled input</label><inputtype=textid=disabledTextInputclass=form-controlplaceholder="Disabled input"></div><divclass=form-group><labelfor=disabledSelect>Disabled select menu</label><selectid=disabledSelectclass=form-control><option>Disabled select</option></select></div><divclass=checkbox><label><inputtype=checkbox> Can't check this </label></div><buttontype=submitclass="btn btn-primary">Submit</button></fieldset></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><form></span>
<spanclass=nt></form></span></code></pre></figure><h2id=forms-control-readonly>Readonly state</h2><p>Add the <code>readonly</code> boolean attribute on an input to prevent modification of the input's value. Read-only inputs appear lighter (just like disabled inputs), but retain the standard cursor.</p><divclass=bs-exampledata-example-id=readonly-text-form-control><form><inputclass=form-controltype=textplaceholder="Readonly input here…"readonly=readonly></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><input</span><spanclass=na>class=</span><spanclass=s>"form-control"</span><spanclass=na>type=</span><spanclass=s>"text"</span><spanclass=na>placeholder=</span><spanclass=s>"Readonly input here…"</span><spanclass=na>readonly</span><spanclass=nt>></span></code></pre></figure><h2id=forms-help-text>Help text</h2><p>Block level help text for form controls.</p><divclass="bs-callout bs-callout-info"id=callout-help-text-accessibility><h4>Associating help text with form controls</h4><p>Help text should be explicitly associated with the form control it relates to using the <code>aria-describedby</code> attribute. This will ensure that assistive technologies – such as screen readers – will announce this help text when the user focuses or enters the control.</p></div><divclass=bs-exampledata-example-id=simple-help-text><form><divclass=form-group><labelfor=inputHelpBlock>Input with help text</label><inputtype=textid=inputHelpBlockclass=form-controlaria-describedby=helpBlock></div><spanid=helpBlockclass=help-block>A block of help text that breaks onto a new line and may extend beyond one line.</span></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"sr-only"</span><spanclass=na>for=</span><spanclass=s>"inputHelpBlock"</span><spanclass=nt>></span>Input with help text<spanclass=nt></label></span>
<spanclass=nt><span</span><spanclass=na>id=</span><spanclass=s>"helpBlock"</span><spanclass=na>class=</span><spanclass=s>"help-block"</span><spanclass=nt>></span>A block of help text that breaks onto a new line and may extend beyond one line.<spanclass=nt></span></span></code></pre></figure></div><h2id=forms-control-validation>Validation states</h2><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><divclass="bs-callout bs-callout-warning"id=callout-form-validation-state-accessibility><h4>Conveying validation state to assistive technologies and colorblind users</h4><p>Using these validation styles to denote the state of a form control only provides a visual, color-based indication, which will not be conveyed to users of assistive technologies - such as screen readers - or to colorblind users.</p><p>Ensure that an alternative indication of state is also provided. For instance, you can include a hint about state in the form control's <code><label></code> text itself (as is the case in the following code example), include a <ahref=../components/#glyphicons>Glyphicon</a> (with appropriate alternative text using the <code>.sr-only</code> class - see the <ahref=../components/#glyphicons-examples>Glyphicon examples</a>), or by providing an additional <ahref=#forms-help-text>help text</a> block. Specifically for assistive technologies, invalid form controls can also be assigned an <code>aria-invalid="true"</code> attribute.</p></div><divclass=bs-exampledata-example-id=form-validation-states><form><divclass="form-group has-success"><labelclass=control-labelfor=inputSuccess1>Input with success</label><inputtype=textclass=form-controlid=inputSuccess1aria-describedby=helpBlock2><spanid=helpBlock2class=help-block>A block of help text that breaks onto a new line and may extend beyond one line.</span></div><divclass="form-group has-warning"><labelclass=control-labelfor=inputWarning1>Input with warning</label><inputtype=textclass=form-controlid=inputWarning1></div><divclass="form-group has-error"><labelclass=control-labelfor=inputError1>Input with error</label><inputtype=textclass=form-controlid=inputError1></div><divclass=has-success><divclass=checkbox><label><inputtype=checkboxid=checkboxSuccessvalue=option1> Checkbox with success </label></div></div><divclass=has-warning><divclass=checkbox><label><inputtype=checkboxid=checkboxWarningvalue=option1> Checkbox with warning </label></div></div><divclass=has-error><divclass=checkbox><label><inputtype=checkboxid=checkboxErrorvalue=option1> Checkbox with error </label></div></div></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"form-group has-success"</span><spanclass=nt>></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label"</span><spanclass=na>for=</span><spanclass=s>"inputSuccess1"</span><spanclass=nt>></span>Input with success<spanclass=nt></label></span>
<spanclass=nt><span</span><spanclass=na>id=</span><spanclass=s>"helpBlock2"</span><spanclass=na>class=</span><spanclass=s>"help-block"</span><spanclass=nt>></span>A block of help text that breaks onto a new line and may extend beyond one line.<spanclass=nt></span></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label"</span><spanclass=na>for=</span><spanclass=s>"inputWarning1"</span><spanclass=nt>></span>Input with warning<spanclass=nt></label></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label"</span><spanclass=na>for=</span><spanclass=s>"inputError1"</span><spanclass=nt>></span>Input with error<spanclass=nt></label></span>
<spanclass=nt></div></span></code></pre></figure><h3>With optional icons</h3><p>You can also add optional feedback icons with the addition of <code>.has-feedback</code> and the right icon.</p><p><strongclass=text-danger>Feedback icons only work with textual <code><input class="form-control"></code> elements.</strong></p><divclass="bs-callout bs-callout-warning"id=callout-has-feedback-icon-positioning><h4>Icons, labels, and input groups</h4><p>Manual positioning of feedback icons is required for inputs without a label and for <ahref=../components#input-groups>input groups</a> with an add-on on the right. You are strongly encouraged to provide labels for all inputs for accessibility reasons. If you wish to prevent labels from being displayed, hide them with the <code>.sr-only</code> class. If you must do without labels, adjust the <code>top</code> value of the feedback icon. For input groups, adjust the <code>right</code> value to an appropriate pixel value depending on the width of your addon.</p></div><divclass="bs-callout bs-callout-warning"id=callout-has-feedback-icon-accessibility><h4>Conveying the icon's meaning to assistive technologies</h4><p>To ensure that assistive technologies – such as screen readers – correctly convey the meaning of an icon, additional hidden text should be included with the <code>.sr-only</code> class and explicitly associated with the form control it relates to using <code>aria-describedby</code>. Alternatively, ensure that the meaning (for instance, the fact that there is a warning for a particular text entry field) is conveyed in some other form, such as changing the text of the actual <code><label></code> associated with the form control.</p><p>Although the following examples already mention the validation state of their respective form controls in the <code><label></code> text itself, the above technique (using <code>.sr-only</code> text and <code>aria-describedby</code>) has been included for illustrative purposes.</p></div><divclass=bs-exampledata-example-id=form-validation-states-with-icons><form><divclass="form-group has-success has-feedback"><labelclass=control-labelfor=inputSuccess2>Input with success</label><inputtype=textclass=form-controlid=inputSuccess2aria-describedby=inputSuccess2Status><spanclass="glyphicon glyphicon-ok form-control-feedback"aria-hidden=true></span><spanid=inputSuccess2Statusclass=sr-only>(success)</span></div><divclass="form-group has-warning has-feedback"><labelclass=control-labelfor=inputWarning2>Input with warning</label><inputtype=textclass=form-controlid=inputWarning2aria-describedby=inputWarning2Status><spanclass="glyphicon glyphicon-warning-sign form-control-feedback"aria-hidden=true></span><spanid=inputWarning2Statusclass=sr-only>(warning)</span></div><divclass="form-group has-error has-feedback"><labelclass=control-labelfor=inputError2>Input with error</label><inputtype=textclass=form-controlid=inputError2aria-describedby=inputError2Status><spanclass="glyphicon glyphicon-remove form-control-feedback"aria-hidden=true></span><spanid=inputError2Statusclass=sr-only>(error)</span></div><divclass="form-group has-success has-feedback"><labelclass=control-labelfor=inputGroupSuccess1>Input group with success</label><divclass=input-group><spanclass=input-group-addon>@</span><inputtype=textclass=form-controlid=inputGroupSuccess1aria-describedby=inputGroupSuccess1Status></div><spanclass="glyphicon glyphicon-ok form-control-feedback"aria-hidden=true></span><spanid=inputGroupSuccess1Statusclass=sr-only>(success)</span></div></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"form-group has-success has-feedback"</span><spanclass=nt>></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label"</span><spanclass=na>for=</span><spanclass=s>"inputSuccess2"</span><spanclass=nt>></span>Input with success<spanclass=nt></label></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label"</span><spanclass=na>for=</span><spanclass=s>"inputWarning2"</span><spanclass=nt>></span>Input with warning<spanclass=nt></label></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label"</span><spanclass=na>for=</span><spanclass=s>"inputError2"</span><spanclass=nt>></span>Input with error<spanclass=nt></label></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label"</span><spanclass=na>for=</span><spanclass=s>"inputGroupSuccess1"</span><spanclass=nt>></span>Input group with success<spanclass=nt></label></span>
<spanclass=nt></div></span></code></pre></figure><h4>Optional icons in horizontal and inline forms</h4><divclass=bs-exampledata-example-id=horizontal-form-validation-state-with-icon><formclass=form-horizontal><divclass="form-group has-success has-feedback"><labelclass="control-label col-sm-3"for=inputSuccess3>Input with success</label><divclass=col-sm-9><inputtype=textclass=form-controlid=inputSuccess3aria-describedby=inputSuccess3Status><spanclass="glyphicon glyphicon-ok form-control-feedback"aria-hidden=true></span><spanid=inputSuccess3Statusclass=sr-only>(success)</span></div></div><divclass="form-group has-success has-feedback"><labelclass="control-label col-sm-3"for=inputGroupSuccess2>Input group with success</label><divclass=col-sm-9><divclass=input-group><spanclass=input-group-addon>@</span><inputtype=textclass=form-controlid=inputGroupSuccess2aria-describedby=inputGroupSuccess2Status></div><spanclass="glyphicon glyphicon-ok form-control-feedback"aria-hidden=true></span><spanid=inputGroupSuccess2Statusclass=sr-only>(success)</span></div></div></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><form</span><spanclass=na>class=</span><spanclass=s>"form-horizontal"</span><spanclass=nt>></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label col-sm-3"</span><spanclass=na>for=</span><spanclass=s>"inputSuccess3"</span><spanclass=nt>></span>Input with success<spanclass=nt></label></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label col-sm-3"</span><spanclass=na>for=</span><spanclass=s>"inputGroupSuccess2"</span><spanclass=nt>></span>Input group with success<spanclass=nt></label></span>
<spanclass=nt></form></span></code></pre></figure><divclass=bs-exampledata-example-id=inline-form-validation-state-with-icon><formclass=form-inline><divclass="form-group has-success has-feedback"><labelclass=control-labelfor=inputSuccess4>Input with success</label><inputtype=textclass=form-controlid=inputSuccess4aria-describedby=inputSuccess4Status><spanclass="glyphicon glyphicon-ok form-control-feedback"aria-hidden=true></span><spanid=inputSuccess4Statusclass=sr-only>(success)</span></div></form><br><formclass=form-inline><divclass="form-group has-success has-feedback"><labelclass=control-labelfor=inputGroupSuccess3>Input group with success</label><divclass=input-group><spanclass=input-group-addon>@</span><inputtype=textclass=form-controlid=inputGroupSuccess3aria-describedby=inputGroupSuccess3Status></div><spanclass="glyphicon glyphicon-ok form-control-feedback"aria-hidden=true></span><spanid=inputGroupSuccess3Statusclass=sr-only>(success)</span></div></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><form</span><spanclass=na>class=</span><spanclass=s>"form-inline"</span><spanclass=nt>></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label"</span><spanclass=na>for=</span><spanclass=s>"inputSuccess4"</span><spanclass=nt>></span>Input with success<spanclass=nt></label></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label"</span><spanclass=na>for=</span><spanclass=s>"inputGroupSuccess3"</span><spanclass=nt>></span>Input group with success<spanclass=nt></label></span>
<spanclass=nt></form></span></code></pre></figure><h4>Optional icons with hidden <code>.sr-only</code> labels</h4><p>If you use the <code>.sr-only</code> class to hide a form control's <code><label></code> (rather than using other labelling options, such as the <code>aria-label</code> attribute), Bootstrap will automatically adjust the position of the icon once it's been added.</p><divclass=bs-exampledata-example-id=form-validation-state-with-icon-without-label><divclass="form-group has-success has-feedback"><labelclass="control-label sr-only"for=inputSuccess5>Hidden label</label><inputtype=textclass=form-controlid=inputSuccess5aria-describedby=inputSuccess5Status><spanclass="glyphicon glyphicon-ok form-control-feedback"aria-hidden=true></span><spanid=inputSuccess5Statusclass=sr-only>(success)</span></div><divclass="form-group has-success has-feedback"><labelclass="control-label sr-only"for=inputGroupSuccess4>Input group with success</label><divclass=input-group><spanclass=input-group-addon>@</span><inputtype=textclass=form-controlid=inputGroupSuccess4aria-describedby=inputGroupSuccess4Status></div><spanclass="glyphicon glyphicon-ok form-control-feedback"aria-hidden=true></span><spanid=inputGroupSuccess4Statusclass=sr-only>(success)</span></div></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"form-group has-success has-feedback"</span><spanclass=nt>></span>
<spanclass=nt><label</span><spanclass=na>class=</span><spanclass=s>"control-label sr-only"</span><spanclass=na>for=</span><spanclass=s>"inputGroupSuccess4"</span><spanclass=nt>></span>Input group with success<spanclass=nt></label></span>
<spanclass=nt></div></span></code></pre></figure><h2id=forms-control-sizes>Control sizing</h2><p>Set heights using classes like <code>.input-lg</code>, and set widths using grid column classes like <code>.col-lg-*</code>.</p><h3>Height sizing</h3><p>Create taller or shorter form controls that match button sizes.</p><divclass="bs-example bs-example-control-sizing"data-example-id=form-control-height-sizes><form><divclass=controls><inputclass="form-control input-lg"type=textplaceholder=.input-lg><inputtype=textclass=form-controlplaceholder="Default input"><inputclass="form-control input-sm"type=textplaceholder=.input-sm><selectclass="form-control input-lg"><optionvalue="">.input-lg</option></select><selectclass=form-control><optionvalue="">Default select</option></select><selectclass="form-control input-sm"><optionvalue="">.input-sm</option></select></div></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><input</span><spanclass=na>class=</span><spanclass=s>"form-control input-lg"</span><spanclass=na>type=</span><spanclass=s>"text"</span><spanclass=na>placeholder=</span><spanclass=s>".input-lg"</span><spanclass=nt>></span>
<spanclass=nt><select</span><spanclass=na>class=</span><spanclass=s>"form-control input-sm"</span><spanclass=nt>></span>...<spanclass=nt></select></span></code></pre></figure><h3>Horizontal form group sizes</h3><p>Quickly size labels and form controls within <code>.form-horizontal</code> by adding <code>.form-group-lg</code> or <code>.form-group-sm</code>.</p><divclass=bs-exampledata-example-id=form-group-height-sizes><formclass=form-horizontal><divclass="form-group form-group-lg"><labelclass="col-sm-2 control-label"for=formGroupInputLarge>Large label</label><divclass=col-sm-10><inputclass=form-controltype=textid=formGroupInputLargeplaceholder="Large input"></div></div><divclass="form-group form-group-sm"><labelclass="col-sm-2 control-label"for=formGroupInputSmall>Small label</label><divclass=col-sm-10><inputclass=form-controltype=textid=formGroupInputSmallplaceholder="Small input"></div></div></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><form</span><spanclass=na>class=</span><spanclass=s>"form-horizontal"</span><spanclass=nt>></span>
<spanclass=nt></form></span></code></pre></figure><h3>Column sizing</h3><p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p><divclass=bs-exampledata-example-id=form-control-column-sizing><form><divclass=row><divclass=col-xs-2><inputtype=textclass=form-controlplaceholder=.col-xs-2></div><divclass=col-xs-3><inputtype=textclass=form-controlplaceholder=.col-xs-3></div><divclass=col-xs-4><inputtype=textclass=form-controlplaceholder=.col-xs-4></div></div></form></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"row"</span><spanclass=nt>></span>
<spanclass=nt></div></span></code></pre></figure><divclass=bs-docs-section><h1id=buttonsclass=page-header>Buttons</h1><h2id=buttons-tags>Button tags</h2><p>Use the button classes on an <code><a></code>, <code><button></code>, or <code><input></code> element.</p><formclass=bs-exampledata-example-id=btn-tags><aclass="btn btn-default"href=#role=button>Link</a><buttonclass="btn btn-default"type=submit>Button</button><inputclass="btn btn-default"type=buttonvalue=Input><inputclass="btn btn-default"type=submitvalue=Submit></form><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><a</span><spanclass=na>class=</span><spanclass=s>"btn btn-default"</span><spanclass=na>href=</span><spanclass=s>"#"</span><spanclass=na>role=</span><spanclass=s>"button"</span><spanclass=nt>></span>Link<spanclass=nt></a></span>
<spanclass=nt><input</span><spanclass=na>class=</span><spanclass=s>"btn btn-default"</span><spanclass=na>type=</span><spanclass=s>"submit"</span><spanclass=na>value=</span><spanclass=s>"Submit"</span><spanclass=nt>></span></code></pre></figure><divclass="bs-callout bs-callout-warning"id=callout-buttons-context-usage><h4>Context-specific usage</h4><p>While button classes can be used on <code><a></code> and <code><button></code> elements, only <code><button></code> elements are supported within our nav and navbar components.</p></div><divclass="bs-callout bs-callout-warning"id=callout-buttons-anchor-accessibility><h4>Links acting as buttons</h4><p>If the <code><a></code> elements are used to act as buttons – triggering in-page functionality, rather than navigating to another document or section within the current page – they should also be given an appropriate <code>role="button"</code>.</p></div><divclass="bs-callout bs-callout-warning"id=callout-buttons-ff-height><h4>Cross-browser rendering</h4><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><p>Among other things, there's <ahref="https://bugzilla.mozilla.org/show_bug.cgi?id=697451">a bug in Firefox <30</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></div><h2id=buttons-options>Options</h2><p>Use any of the available button classes to quickly create a styled button.</p><divclass=bs-exampledata-example-id=btn-variants><buttontype=buttonclass="btn btn-default">Default</button><buttontype=buttonclass="btn btn-primary">Primary</button><buttontype=buttonclass="btn btn-success">Success</button><buttontype=buttonclass="btn btn-info">Info</button><buttontype=buttonclass="btn btn-warning">Warning</button><buttontype=buttonclass="btn btn-danger">Danger</button><buttontype=buttonclass="btn btn-link">Link</button></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=c><!-- Standard button --></span>
<spanclass=c><!-- Deemphasize a button by making it look like a link while maintaining button behavior --></span>
<spanclass=nt><button</span><spanclass=na>type=</span><spanclass=s>"button"</span><spanclass=na>class=</span><spanclass=s>"btn btn-link"</span><spanclass=nt>></span>Link<spanclass=nt></button></span></code></pre></figure><divclass="bs-callout bs-callout-warning"id=callout-buttons-color-accessibility><h4>Conveying meaning to assistive technologies</h4><p>Using color to add meaning to a button only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the visible text of the button), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p></div><h2id=buttons-sizes>Sizes</h2><p>Fancy larger or smaller buttons? Add <code>.btn-lg</code>, <code>.btn-sm</code>, or <code>.btn-xs</code> for additional sizes.</p><divclass=bs-exampledata-example-id=btn-sizes><p><buttontype=buttonclass="btn btn-primary btn-lg">Large button</button><buttontype=buttonclass="btn btn-default btn-lg">Large button</button></p><p><buttontype=buttonclass="btn btn-primary">Default button</button><buttontype=buttonclass="btn btn-default">Default button</button></p><p><buttontype=buttonclass="btn btn-primary btn-sm">Small button</button><buttontype=buttonclass="btn btn-default btn-sm">Small button</button></p><p><buttontype=buttonclass="btn btn-primary btn-xs">Extra small button</button><buttontype=buttonclass="btn btn-default btn-xs">Extra small button</button></p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><p></span>
<spanclass=nt><button</span><spanclass=na>type=</span><spanclass=s>"button"</span><spanclass=na>class=</span><spanclass=s>"btn btn-primary btn-xs"</span><spanclass=nt>></span>Extra small button<spanclass=nt></button></span>
<spanclass=nt><button</span><spanclass=na>type=</span><spanclass=s>"button"</span><spanclass=na>class=</span><spanclass=s>"btn btn-default btn-xs"</span><spanclass=nt>></span>Extra small button<spanclass=nt></button></span>
<spanclass=nt></p></span></code></pre></figure><p>Create block level buttons—those that span the full width of a parent— by adding <code>.btn-block</code>.</p><divclass=bs-exampledata-example-id=block-btns><divclass="well center-block"style=max-width:400px><buttontype=buttonclass="btn btn-primary btn-lg btn-block">Block level button</button><buttontype=buttonclass="btn btn-default btn-lg btn-block">Block level button</button></div></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><button</span><spanclass=na>type=</span><spanclass=s>"button"</span><spanclass=na>class=</span><spanclass=s>"btn btn-primary btn-lg btn-block"</span><spanclass=nt>></span>Block level button<spanclass=nt></button></span>
<spanclass=nt><button</span><spanclass=na>type=</span><spanclass=s>"button"</span><spanclass=na>class=</span><spanclass=s>"btn btn-default btn-lg btn-block"</span><spanclass=nt>></span>Block level button<spanclass=nt></button></span></code></pre></figure><h2id=buttons-active>Active state</h2><p>Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <code><button></code> elements, this is done via <code>:active</code>. For <code><a></code> elements, it's done with <code>.active</code>. However, you may use <code>.active</code> on <code><button></code>s (and include the <code>aria-pressed="true"</code> attribute) should you need to replicate the active state programmatically.</p><h3>Button element</h3><p>No need to add <code>:active</code> as it's a pseudo-class, but if you need to force the same appearance, go ahead and add <code>.active</code>.</p><pclass=bs-exampledata-example-id=active-button-btns><buttontype=buttonclass="btn btn-primary btn-lg active">Primary button</button><buttontype=buttonclass="btn btn-default btn-lg active">Button</button></p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><button</span><spanclass=na>type=</span><spanclass=s>"button"</span><spanclass=na>class=</span><spanclass=s>"btn btn-primary btn-lg active"</span><spanclass=nt>></span>Primary button<spanclass=nt></button></span>
<spanclass=nt><button</span><spanclass=na>type=</span><spanclass=s>"button"</span><spanclass=na>class=</span><spanclass=s>"btn btn-default btn-lg active"</span><spanclass=nt>></span>Button<spanclass=nt></button></span></code></pre></figure><h3>Anchor element</h3><p>Add the <code>.active</code> class to <code><a></code> buttons.</p><pclass=bs-exampledata-example-id=active-anchor-btns><ahref=#class="btn btn-primary btn-lg active"role=button>Primary link</a><ahref=#class="btn btn-default btn-lg active"role=button>Link</a></p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><a</span><spanclass=na>href=</span><spanclass=s>"#"</span><spanclass=na>class=</span><spanclass=s>"btn btn-primary btn-lg active"</span><spanclass=na>role=</span><spanclass=s>"button"</span><spanclass=nt>></span>Primary link<spanclass=nt></a></span>
<spanclass=nt><a</span><spanclass=na>href=</span><spanclass=s>"#"</span><spanclass=na>class=</span><spanclass=s>"btn btn-default btn-lg active"</span><spanclass=na>role=</span><spanclass=s>"button"</span><spanclass=nt>></span>Link<spanclass=nt></a></span></code></pre></figure><h2id=buttons-disabled>Disabled state</h2><p>Make buttons look unclickable by fading them back with <code>opacity</code>.</p><h3>Button element</h3><p>Add the <code>disabled</code> attribute to <code><button></code> buttons.</p><pclass=bs-exampledata-example-id=disabled-button-btns><buttontype=buttonclass="btn btn-primary btn-lg"disabled=disabled>Primary button</button><buttontype=buttonclass="btn btn-default btn-lg"disabled=disabled>Button</button></p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><button</span><spanclass=na>type=</span><spanclass=s>"button"</span><spanclass=na>class=</span><spanclass=s>"btn btn-lg btn-primary"</span><spanclass=na>disabled=</span><spanclass=s>"disabled"</span><spanclass=nt>></span>Primary button<spanclass=nt></button></span>
<spanclass=nt><button</span><spanclass=na>type=</span><spanclass=s>"button"</span><spanclass=na>class=</span><spanclass=s>"btn btn-default btn-lg"</span><spanclass=na>disabled=</span><spanclass=s>"disabled"</span><spanclass=nt>></span>Button<spanclass=nt></button></span></code></pre></figure><divclass="bs-callout bs-callout-danger"id=callout-buttons-ie-disabled><h4>Cross-browser compatibility</h4><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></div><h3>Anchor element</h3><p>Add the <code>.disabled</code> class to <code><a></code> buttons.</p><pclass=bs-exampledata-example-id=disabled-anchor-btns><ahref=#class="btn btn-primary btn-lg disabled"role=button>Primary link</a><ahref=#class="btn btn-default btn-lg disabled"role=button>Link</a></p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><a</span><spanclass=na>href=</span><spanclass=s>"#"</span><spanclass=na>class=</span><spanclass=s>"btn btn-primary btn-lg disabled"</span><spanclass=na>role=</span><spanclass=s>"button"</span><spanclass=nt>></span>Primary link<spanclass=nt></a></span>
<spanclass=nt><a</span><spanclass=na>href=</span><spanclass=s>"#"</span><spanclass=na>class=</span><spanclass=s>"btn btn-default btn-lg disabled"</span><spanclass=na>role=</span><spanclass=s>"button"</span><spanclass=nt>></span>Link<spanclass=nt></a></span></code></pre></figure><p> We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required. </p><divclass="bs-callout bs-callout-warning"id=callout-buttons-disabled-anchor><h4>Link functionality caveat</h4><p>This class uses <code>pointer-events: none</code> to try to disable the link functionality of <code><a></code>s, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. In addition, even in browsers that do support <code>pointer-events: none</code>, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, use custom JavaScript to disable such links.</p></div></div><divclass=bs-docs-section><h1id=imagesclass=page-header>Images</h1><h2id=images-responsive>Responsive images</h2><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>, <code>height: auto;</code> and <code>display: block;</code> to the image so that it scales nicely to the parent element.</p><p>To center images which use the <code>.img-responsive</code> class, use <code>.center-block</code> instead of <code>.text-center</code>. <ahref=../css/#helper-classes-center>See the helper classes section</a> for more details about <code>.center-block</code> usage.</p><divclass="bs-callout bs-callout-warning"id=callout-images-ie-svg><h4>SVG images and IE 8-10</h4><p>In Internet Explorer 8-10, SVG images with <code>.img-responsive</code> are disproportionately sized. To fix this, add <code>width: 100% \9;</code> where necessary. Bootstrap doesn't apply this automatically as it causes complications to other image formats.</p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><img</span><spanclass=na>src=</span><spanclass=s>"..."</span><spanclass=na>class=</span><spanclass=s>"img-responsive"</span><spanclass=na>alt=</span><spanclass=s>"Responsive image"</span><spanclass=nt>></span></code></pre></figure><h2id=images-shapes>Image shapes</h2><p>Add classes to an <code><img></code> element to easily style images in any project.</p><divclass="bs-callout bs-callout-danger"id=callout-images-ie-rounded-corners><h4>Cross-browser compatibility</h4><p>Keep in mind that Internet Explorer 8 lacks support for rounded corners.</p></div><divclass="bs-example bs-example-images"data-example-id=image-shapes><imgdata-src=holder.js/140x140class=img-roundedalt="A generic square placeholder image with rounded corners"><imgdata-src=holder.js/140x140class=img-circlealt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible"><imgdata-src=holder.js/140x140class=img-thumbnailalt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera"></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><img</span><spanclass=na>src=</span><spanclass=s>"..."</span><spanclass=na>alt=</span><spanclass=s>"..."</span><spanclass=na>class=</span><spanclass=s>"img-rounded"</span><spanclass=nt>></span>
<spanclass=nt><img</span><spanclass=na>src=</span><spanclass=s>"..."</span><spanclass=na>alt=</span><spanclass=s>"..."</span><spanclass=na>class=</span><spanclass=s>"img-thumbnail"</span><spanclass=nt>></span></code></pre></figure></div><divclass=bs-docs-section><h1id=helper-classesclass=page-header>Helper classes</h1><h3id=helper-classes-colors>Contextual colors</h3><p>Convey meaning through color with a handful of emphasis utility classes. These may also be applied to links and will darken on hover just like our default link styles.</p><divclass=bs-exampledata-example-id=contextual-colors-helpers><pclass=text-muted>Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p><pclass=text-primary>Nullam id dolor id nibh ultricies vehicula ut id elit.</p><pclass=text-success>Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p><pclass=text-info>Maecenas sed diam eget risus varius blandit sit amet non magna.</p><pclass=text-warning>Etiam porta sem malesuada magna mollis euismod.</p><pclass=text-danger>Donec ullamcorper nulla non metus auctor fringilla.</p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><p</span><spanclass=na>class=</span><spanclass=s>"text-muted"</span><spanclass=nt>></span>...<spanclass=nt></p></span>
<spanclass=nt><p</span><spanclass=na>class=</span><spanclass=s>"text-danger"</span><spanclass=nt>></span>...<spanclass=nt></p></span></code></pre></figure><divclass="bs-callout bs-callout-info"id=callout-helper-context-color-specificity><h4>Dealing with specificity</h4><p>Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <code><span></code> with the class.</p></div><divclass="bs-callout bs-callout-warning"id=callout-helper-context-color-accessibility><h4>Conveying meaning to assistive technologies</h4><p>Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the contextual colors are only used to reinforce meaning that is already present in the text/markup), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p></div><h3id=helper-classes-backgrounds>Contextual backgrounds</h3><p>Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes.</p><divclass="bs-example bs-example-bg-classes"data-example-id=contextual-backgrounds-helpers><pclass=bg-primary>Nullam id dolor id nibh ultricies vehicula ut id elit.</p><pclass=bg-success>Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p><pclass=bg-info>Maecenas sed diam eget risus varius blandit sit amet non magna.</p><pclass=bg-warning>Etiam porta sem malesuada magna mollis euismod.</p><pclass=bg-danger>Donec ullamcorper nulla non metus auctor fringilla.</p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><p</span><spanclass=na>class=</span><spanclass=s>"bg-primary"</span><spanclass=nt>></span>...<spanclass=nt></p></span>
<spanclass=nt><p</span><spanclass=na>class=</span><spanclass=s>"bg-danger"</span><spanclass=nt>></span>...<spanclass=nt></p></span></code></pre></figure><divclass="bs-callout bs-callout-info"id=callout-helper-bg-specificity><h4>Dealing with specificity</h4><p>Sometimes contextual background classes cannot be applied due to the specificity of another selector. In some cases, a sufficient workaround is to wrap your element's content in a <code><div></code> with the class.</p></div><divclass="bs-callout bs-callout-warning"id=callout-helper-bg-accessibility><h4>Conveying meaning to assistive technologies</h4><p>As with <ahref=#helper-classes-colors>contextual colors</a>, ensure that any meaning conveyed through color is also conveyed in a format that is not purely presentational.</p></div><h3id=helper-classes-close>Close icon</h3><p>Use the generic close icon for dismissing content like modals and alerts.</p><divclass=bs-exampledata-example-id=close-icon><p><buttontype=buttonclass=closearia-label=Close><spanaria-hidden=true>×</span></button></p></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><button</span><spanclass=na>type=</span><spanclass=s>"button"</span><spanclass=na>class=</span><spanclass=s>"close"</span><spanclass=na>aria-label=</span><spanclass=s>"Close"</span><spanclass=nt>><span</span><spanclass=na>aria-hidden=</span><spanclass=s>"true"</span><spanclass=nt>></span><spanclass=ni>&times;</span><spanclass=nt></span></button></span></code></pre></figure><h3id=helper-classes-carets>Carets</h3><p>Use carets to indicate dropdown functionality and direction. Note that the default caret will reverse automatically in <ahref=../components/#btn-dropdowns-dropup>dropup menus</a>.</p><divclass=bs-exampledata-example-id=caret><spanclass=caret></span></div><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><span</span><spanclass=na>class=</span><spanclass=s>"caret"</span><spanclass=nt>></span></span></code></pre></figure><h3id=helper-classes-floats>Quick floats</h3><p>Float an element to the left or right with a class. <code>!important</code> is included to avoid specificity issues. Classes can also be used as mixins.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"pull-left"</span><spanclass=nt>></span>...<spanclass=nt></div></span>
<spanclass=p>}</span></code></pre></figure><divclass="bs-callout bs-callout-warning"id=callout-helper-pull-navbar><h4>Not for use in navbars</h4><p>To align components in navbars with utility classes, use <code>.navbar-left</code> or <code>.navbar-right</code> instead. <ahref=../components/#navbar-component-alignment>See the navbar docs</a> for details.</p></div><h3id=helper-classes-center>Center content blocks</h3><p>Set an element to <code>display: block</code> and center via <code>margin</code>. Available as a mixin and class.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"center-block"</span><spanclass=nt>></span>...<spanclass=nt></div></span></code></pre></figure><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=c1>// Class
<spanclass=p>}</span></code></pre></figure><h3id=helper-classes-clearfix>Clearfix</h3><p>Easily clear <code>float</code>s by adding <code>.clearfix</code><strong>to the parent element</strong>. Utilizes <ahref="http://nicolasgallagher.com/micro-clearfix-hack/">the micro clearfix</a> as popularized by Nicolas Gallagher. Can also be used as a mixin.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=c><!-- Usage as a class --></span>
<spanclass=p>}</span></code></pre></figure><h3id=helper-classes-show-hide>Showing and hiding content</h3><p>Force an element to be shown or hidden (<strong>including for screen readers</strong>) with the use of <code>.show</code> and <code>.hidden</code> classes. These classes use <code>!important</code> to avoid specificity conflicts, just like the <ahref=#helper-classes-floats>quick floats</a>. They are only available for block level toggling. They can also be used as mixins.</p><p><code>.hide</code> is available, but it does not always affect screen readers and is <strong>deprecated</strong> as of v3.0.1. Use <code>.hidden</code> or <code>.sr-only</code> instead.</p><p>Furthermore, <code>.invisible</code> can be used to toggle only the visibility of an element, meaning its <code>display</code> is not modified and the element can still affect the flow of the document.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><div</span><spanclass=na>class=</span><spanclass=s>"show"</span><spanclass=nt>></span>...<spanclass=nt></div></span>
<spanclass=p>}</span></code></pre></figure><h3id=helper-classes-screen-readers>Screen reader and keyboard navigation content</h3><p>Hide an element to all devices <strong>except screen readers</strong> with <code>.sr-only</code>. Combine <code>.sr-only</code> with <code>.sr-only-focusable</code> to show the element again when it's focused (e.g. by a keyboard-only user). Necessary for following <ahref=../getting-started/#accessibility>accessibility best practices</a>. Can also be used as mixins.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><a</span><spanclass=na>class=</span><spanclass=s>"sr-only sr-only-focusable"</span><spanclass=na>href=</span><spanclass=s>"#content"</span><spanclass=nt>></span>Skip to main content<spanclass=nt></a></span></code></pre></figure><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=c1>// Usage as a mixin
<spanclass=p>}</span></code></pre></figure><h3id=helper-classes-image-replacement>Image replacement</h3><p>Utilize the <code>.text-hide</code> class or mixin to help replace an element's text content with a background image.</p><figureclass=highlight><pre><codeclass=language-htmldata-lang=html><spanclass=nt><h1</span><spanclass=na>class=</span><spanclass=s>"text-hide"</span><spanclass=nt>></span>Custom heading<spanclass=nt></h1></span></code></pre></figure><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=c1>// Usage as a mixin
<spanclass=p>}</span></code></pre></figure></div><divclass=bs-docs-section><h1id=responsive-utilitiesclass=page-header>Responsive utilities</h1><pclass=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><p>Try to use these on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.</p><h2id=responsive-utilities-classes>Available classes</h2><p>Use a single or combination of the available classes for toggling content across viewport breakpoints.</p><divclass=table-responsive><tableclass="table table-bordered table-striped responsive-utilities"><thead><tr><th></th><th> Extra small devices <small>Phones (<768px)</small></th><th> Small devices <small>Tablets (≥768px)</small></th><th> Medium devices <small>Desktops (≥992px)</small></th><th> Large devices <small>Desktops (≥1200px)</small></th></tr></thead><tbody><tr><thscope=row><code>.visible-xs-*</code></th><tdclass=is-visible>Visible</td><tdclass=is-hidden>Hidden</td><tdclass=is-hidden>Hidden</td><tdclass=is-hidden>Hidden</td></tr><tr><thscope=row><code>.visible-sm-*</code></th><tdclass=is-hidden>Hidden</td><tdclass=is-visible>Visible</td><tdclass=is-hidden>Hidden</td><tdclass=is-hidden>Hidden</td></tr><tr><thscope=row><code>.visible-md-*</code></th><tdclass=is-hidden>Hidden</td><tdclass=is-hidden>Hidden</td><tdclass=is-visible>Visible</td><tdclass=is-hidden>Hidden</td></tr><tr><thscope=row><code>.visible-lg-*</code></th><tdclass=is-hidden>Hidden</td><tdclass=is-hidden>Hidden</td><tdclass=is-hidden>Hidden</td><tdclass=is-visible>Visible</td></tr></tbody><tbody><tr><thscope=row><code>.hidden-xs</code></th><tdclass=is-hidden>Hidden</td><tdclass=is-visible>Visible</td><tdclass=is-visible>Visible</td><tdclass=is-visible>Visible</td></tr><tr><thscope=row><code>.hidden-sm</code></th><tdclass=is-visible>Visible</td><tdclass=is-hidden>Hidden</td><tdclass=is-visible>Visible</td><tdclass=is-visible>Visible</td></tr><tr><thscope=row><code>.hidden-md</code></th><tdclass=is-visible>Visible</td><tdclass=is-visible>Visible</td><tdclass=is-hidden>Hidden</td><tdclass=is-visible>Visible</td></tr><tr><thscope=row><code>.hidden-lg</code></th><tdclass=is-visible>Visible</td><tdclass=is-visible>Visible</td><tdclass=is-visible>Visible</td><tdclass=is-hidden>Hidden</td></tr></tbody></table></div><p>As of v3.2.0, the <code>.visible-*-*</code> classes for each breakpoint come in three variations, one for each CSS <code>display</code> property value listed below.</p><divclass=table-responsive><tableclass="table table-bordered table-striped"><thead><tr><th>Group of classes</th><th>CSS <code>display</code></th></tr></thead><tbody><tr><thscope=row><code>.visible-*-block</code></th><td><code>display: block;</code></td></tr><tr><thscope=row><code>.visible-*-inline</code></th><td><code>display: inline;</code></td></tr><tr><thscope=row><code>.visible-*-inline-block</code></th><td><code>display: inline-block;</code></td></tr></tbody></table></div><p>So, for extra small (<code>xs</code>) screens for example, the available <code>.visible-*-*</code> classes are: <code>.visible-xs-block</code>, <code>.visible-xs-inline</code>, and <code>.visible-xs-inline-block</code>.</p><p>The classes <code>.visible-xs</code>, <code>.visible-sm</code>, <code>.visible-md</code>, and <code>.visible-lg</code> also exist, but are <strong>deprecated as of v3.2.0</strong>. They are approximately equivalent to <code>.visible-*-block</code>, except with additional special cases for toggling <code><table></code>-related elements.</p><h2id=responsive-utilities-print>Print classes</h2><p>Similar to the regular responsive classes, use these for toggling content for print.</p><divclass=table-responsive><tableclass="tableta
<spanclass=k>@brand-danger</span><spanclass=nd>:</span><spanclass=nn>#d9534f</span><spanclass=p>;</span></code></pre></figure><p>Use any of these color variables as they are or reassign them to more meaningful variables for your project.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=c1>// Use as-is
<spanclass=p>}</span></code></pre></figure><h3id=less-variables-scaffolding>Scaffolding</h3><p>A handful of variables for quickly customizing key elements of your site's skeleton.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=c1>// Scaffolding
<spanclass=k>@text-color</span><spanclass=nd>:</span><spanclass=o>@</span><spanclass=nt>black-50</span><spanclass=p>;</span></code></pre></figure><h3id=less-variables-links>Links</h3><p>Easily style your links with the right color with only one value.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=c1>// Variables
<spanclass=p>}</span></code></pre></figure><p>Note that the <code>@link-hover-color</code> uses a function, another awesome tool from Less, to automagically create the right hover color. You can use <code>darken</code>, <code>lighten</code>, <code>saturate</code>, and <code>desaturate</code>.</p><h3id=less-variables-typography>Typography</h3><p>Easily set your typeface, text size, leading, and more with a few quick variables. Bootstrap makes use of these as well to provide easy typographic mixins.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=k>@font-family-sans-serif</span><spanclass=nd>:</span><spanclass=s2>"Helvetica Neue"</span><spanclass=o>,</span><spanclass=nt>Helvetica</span><spanclass=o>,</span><spanclass=nt>Arial</span><spanclass=o>,</span><spanclass=nt>sans-serif</span><spanclass=p>;</span>
<spanclass=k>@font-family-serif</span><spanclass=nd>:</span><spanclass=nt>Georgia</span><spanclass=o>,</span><spanclass=s2>"Times New Roman"</span><spanclass=o>,</span><spanclass=nt>Times</span><spanclass=o>,</span><spanclass=nt>serif</span><spanclass=p>;</span>
<spanclass=k>@headings-color</span><spanclass=nd>:</span><spanclass=nt>inherit</span><spanclass=p>;</span></code></pre></figure><h3id=less-variables-icons>Icons</h3><p>Two quick variables for customizing the location and filename of your icons.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=k>@icon-font-path</span><spanclass=nd>:</span><spanclass=s2>"../fonts/"</span><spanclass=p>;</span>
<spanclass=k>@icon-font-name</span><spanclass=nd>:</span><spanclass=s2>"glyphicons-halflings-regular"</span><spanclass=p>;</span></code></pre></figure><h3id=less-variables-components>Components</h3><p>Components throughout Bootstrap make use of some default variables for setting common values. Here are the most commonly used.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=k>@padding-base-vertical</span><spanclass=nd>:</span><spanclass=nt>6px</span><spanclass=p>;</span>
<spanclass=k>@caret-width-large</span><spanclass=nd>:</span><spanclass=nt>5px</span><spanclass=p>;</span></code></pre></figure><h2id=less-mixins-vendor>Vendor mixins</h2><p>Vendor mixins are mixins to help support multiple browsers by including all relevant vendor prefixes in your compiled CSS.</p><h3id=less-mixins-box-sizing>Box-sizing</h3><p>Reset your components' box model with a single mixin. For context, see this <ahref=https://developer.mozilla.org/en-US/docs/CSS/box-sizingtarget=_blank>helpful article from Mozilla</a>.</p><p>The mixin is <strong>deprecated</strong> as of v3.2.0, with the introduction of Autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixin internally until Bootstrap v4.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nc>.box-sizing</span><spanclass=o>(@</span><spanclass=nt>box-model</span><spanclass=o>)</span><spanclass=p>{</span>
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-rounded-corners>Rounded corners</h3><p>Today all modern browsers support the non-prefixed <code>border-radius</code> property. As such, there is no <code>.border-radius()</code> mixin, but Bootstrap does include shortcuts for quickly rounding two corners on a particular side of an object.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nc>.border-top-radius</span><spanclass=o>(@</span><spanclass=nt>radius</span><spanclass=o>)</span><spanclass=p>{</span>
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-box-shadow>Box (Drop) shadows</h3><p>If your target audience is using the latest and greatest browsers and devices, be sure to just use the <code>box-shadow</code> property on its own. If you need support for older Android (pre-v4) and iOS devices (pre-iOS 5), use the <strong>deprecated</strong> mixin to pick up the required <code>-webkit</code> prefix.</p><p>The mixin is <strong>deprecated</strong> as of v3.1.0, since Bootstrap doesn't officially support the outdated platforms that don't support the standard property. To preserve backwards-compatibility, Bootstrap will continue to use the mixin internally until Bootstrap v4.</p><p>Be sure to use <code>rgba()</code> colors in your box shadows so they blend as seamlessly as possible with backgrounds.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=err>.</span><spanclass=nl>box-shadow</span><spanclass=err>(@</span><spanclass=na>shadow</span><spanclass=p>:</span><spanclass=m>0</span><spanclass=m>1px</span><spanclass=m>3px</span><spanclass=nf>rgba</span><spanclass=p>(</span><spanclass=m>0</span><spanclass=o>,</span><spanclass=m>0</span><spanclass=o>,</span><spanclass=m>0</span><spanclass=o>,.</span><spanclass=m>25</span><spanclass=p>))</span><spanclass=p>{</span>
<spanclass=na>-webkit-box-shadow</span><spanclass=p>:</span><spanclass=o>@</span><spanclass=n>shadow</span><spanclass=p>;</span><spanclass=c1>// iOS <4.3 & Android <4.1
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-transitions>Transitions</h3><p>Multiple mixins for flexibility. Set all transition information with one, or specify a separate delay and duration as needed.</p><p>The mixins are <strong>deprecated</strong> as of v3.2.0, with the introduction of Autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nc>.transition</span><spanclass=o>(@</span><spanclass=nt>transition</span><spanclass=o>)</span><spanclass=p>{</span>
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-transformations>Transformations</h3><p>Rotate, scale, translate (move), or skew any object.</p><p>The mixins are <strong>deprecated</strong> as of v3.2.0, with the introduction of Autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nc>.rotate</span><spanclass=o>(@</span><spanclass=nt>degrees</span><spanclass=o>)</span><spanclass=p>{</span>
<spanclass=na>-ms-transform</span><spanclass=p>:</span><spanclass=nf>rotate</span><spanclass=p>(</span><spanclass=o>@</span><spanclass=n>degrees</span><spanclass=p>);</span><spanclass=c1>// IE9 only
<spanclass=na>-ms-transform</span><spanclass=p>:</span><spanclass=nf>scale</span><spanclass=p>(</span><spanclass=o>@</span><spanclass=n>ratio</span><spanclass=o>,</span><spanclass=o>@</span><spanclass=n>ratio-y</span><spanclass=p>);</span><spanclass=c1>// IE9 only
<spanclass=na>-ms-transform</span><spanclass=p>:</span><spanclass=nf>translate</span><spanclass=p>(</span><spanclass=o>@</span><spanclass=n>x</span><spanclass=o>,</span><spanclass=o>@</span><spanclass=n>y</span><spanclass=p>);</span><spanclass=c1>// IE9 only
<spanclass=na>-ms-transform</span><spanclass=p>:</span><spanclass=nf>skewX</span><spanclass=p>(</span><spanclass=o>@</span><spanclass=n>x</span><spanclass=p>)</span><spanclass=nf>skewY</span><spanclass=p>(</span><spanclass=o>@</span><spanclass=n>y</span><spanclass=p>);</span><spanclass=c1>// See https://github.com/twbs/bootstrap/issues/4885; IE9+
<spanclass=na>-ms-transform</span><spanclass=p>:</span><spanclass=nf>rotateX</span><spanclass=p>(</span><spanclass=o>@</span><spanclass=n>degrees</span><spanclass=p>);</span><spanclass=c1>// IE9 only
<spanclass=na>-ms-transform</span><spanclass=p>:</span><spanclass=nf>rotateY</span><spanclass=p>(</span><spanclass=o>@</span><spanclass=n>degrees</span><spanclass=p>);</span><spanclass=c1>// IE9 only
<spanclass=na>-ms-transform-origin</span><spanclass=p>:</span><spanclass=o>@</span><spanclass=n>origin</span><spanclass=p>;</span><spanclass=c1>// IE9 only
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-animations>Animations</h3><p>A single mixin for using all of CSS3's animation properties in one declaration and other mixins for individual properties.</p><p>The mixins are <strong>deprecated</strong> as of v3.2.0, with the introduction of Autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nc>.animation</span><spanclass=o>(@</span><spanclass=nt>animation</span><spanclass=o>)</span><spanclass=p>{</span>
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-opacity>Opacity</h3><p>Set the opacity for all browsers and provide a <code>filter</code> fallback for IE8.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nc>.opacity</span><spanclass=o>(@</span><spanclass=nt>opacity</span><spanclass=o>)</span><spanclass=p>{</span>
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-placeholder>Placeholder text</h3><p>Provide context for form controls within each field.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=err>.</span><spanclass=na>placeholder</span><spanclass=err>(@</span><spanclass=nl>color</span><spanclass=p>:</span><spanclass=o>@</span><spanclass=n>input-color-placeholder</span><spanclass=p>)</span><spanclass=p>{</span>
</span><spanclass=err>&</span><spanclass=p>:</span><spanclass=o>-</span><spanclass=n>ms-input-placeholder</span><spanclass=p>{</span><spanclass=nl>color</span><spanclass=p>:</span><spanclass=o>@</span><spanclass=n>color</span><spanclass=p>;</span><spanclass=p>}</span><spanclass=c1>// Internet Explorer 10+
</span><spanclass=err>&</span><spanclass=p>:</span><spanclass=o>:-</span><spanclass=n>webkit-input-placeholder</span><spanclass=p>{</span><spanclass=nl>color</span><spanclass=p>:</span><spanclass=o>@</span><spanclass=n>color</span><spanclass=p>;</span><spanclass=p>}</span><spanclass=c1>// Safari and Chrome
</span><spanclass=p>}</span></code></pre></figure><h3id=less-mixins-columns>Columns</h3><p>Generate columns via CSS within a single element.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nc>.content-columns</span><spanclass=o>(@</span><spanclass=nt>width</span><spanclass=p>;</span><spanclass=k>@count</span><spanclass=p>;</span><spanclass=k>@gap</span><spanclass=o>)</span><spanclass=p>{</span>
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-gradients>Gradients</h3><p>Easily turn any two colors into a background gradient. Get more advanced and set a direction, use three colors, or use a radial gradient. With a single mixin you get all the prefixed syntaxes you'll need.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nn>#gradient</span><spanclass=o>></span><spanclass=nc>.vertical</span><spanclass=o>(</span><spanclass=nn>#333</span><spanclass=p>;</span><spanclass=nn>#000</span><spanclass=o>)</span><spanclass=p>;</span>
<spanclass=nn>#gradient</span><spanclass=o>></span><spanclass=nc>.radial</span><spanclass=o>(</span><spanclass=nn>#333</span><spanclass=p>;</span><spanclass=nn>#000</span><spanclass=o>)</span><spanclass=p>;</span></code></pre></figure><p>You can also specify the angle of a standard two-color, linear gradient:</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nn>#gradient</span><spanclass=o>></span><spanclass=nc>.directional</span><spanclass=o>(</span><spanclass=nn>#333</span><spanclass=p>;</span><spanclass=nn>#000</span><spanclass=p>;</span><spanclass=nt>45deg</span><spanclass=o>)</span><spanclass=p>;</span></code></pre></figure><p>If you need a barber-stripe style gradient, that's easy, too. Just specify a single color and we'll overlay a translucent white stripe.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nn>#gradient</span><spanclass=o>></span><spanclass=nc>.striped</span><spanclass=o>(</span><spanclass=nn>#333</span><spanclass=p>;</span><spanclass=nt>45deg</span><spanclass=o>)</span><spanclass=p>;</span></code></pre></figure><p>Up the ante and use three colors instead. Set the first color, the second color, the second color's color stop (a percentage value like 25%), and the third color with these mixins:</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nn>#gradient</span><spanclass=o>></span><spanclass=nc>.vertical-three-colors</span><spanclass=o>(</span><spanclass=nn>#777</span><spanclass=p>;</span><spanclass=nn>#333</span><spanclass=p>;</span><spanclass=nt>25</span><spanclass=nv>%</span><spanclass=p>;</span><spanclass=nn>#000</span><spanclass=o>)</span><spanclass=p>;</span>
<spanclass=nn>#gradient</span><spanclass=o>></span><spanclass=nc>.horizontal-three-colors</span><spanclass=o>(</span><spanclass=nn>#777</span><spanclass=p>;</span><spanclass=nn>#333</span><spanclass=p>;</span><spanclass=nt>25</span><spanclass=nv>%</span><spanclass=p>;</span><spanclass=nn>#000</span><spanclass=o>)</span><spanclass=p>;</span></code></pre></figure><p><strong>Heads up!</strong> Should you ever need to remove a gradient, be sure to remove any IE-specific <code>filter</code> you may have added. You can do that by using the <code>.reset-filter()</code> mixin alongside <code>background-image: none;</code>.</p><h2id=less-mixins-utility>Utility mixins</h2><p>Utility mixins are mixins that combine otherwise unrelated CSS properties to achieve a specific goal or task.</p><h3id=less-mixins-clearfix>Clearfix</h3><p>Forget adding <code>class="clearfix"</code> to any element and instead add the <code>.clearfix()</code> mixin where appropriate. Uses the <ahref=http://nicolasgallagher.com/micro-clearfix-hack/target=_blank>micro clearfix</a> from <ahref=https://twitter.com/necolastarget=_blank>Nicolas Gallagher</a>.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=c1>// Mixin
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-centering>Horizontal centering</h3><p>Quickly center any element within its parent. <strong>Requires <code>width</code> or <code>max-width</code> to be set.</strong></p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=c1>// Mixin
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-sizing>Sizing helpers</h3><p>Specify the dimensions of an object more easily.</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=c1>// Mixins
<spanclass=nc>.avatar</span><spanclass=p>{</span><spanclass=nc>.square</span><spanclass=o>(</span><spanclass=nt>48px</span><spanclass=o>)</span><spanclass=p>;</span><spanclass=p>}</span></code></pre></figure><h3id=less-mixins-resizable>Resizable textareas</h3><p>Easily configure the resize options for any textarea, or any other element. Defaults to normal browser behavior (<code>both</code>).</p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=err>.</span><spanclass=na>resizable</span><spanclass=err>(@</span><spanclass=nl>direction</span><spanclass=p>:</span><spanclass=nb>both</span><spanclass=p>)</span><spanclass=p>{</span>
<spanclass=c1>// Options: horizontal, vertical, both
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-truncating>Truncating text</h3><p>Easily truncate text with an ellipsis with a single mixin. <strong>Requires element to be <code>block</code> or <code>inline-block</code> level.</strong></p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=c1>// Mixin
<spanclass=p>}</span></code></pre></figure><h3id=less-mixins-retina-images>Retina images</h3><p>Specify two image paths and the @1x image dimensions, and Bootstrap will provide an @2x media query. <strong>If you have many images to serve, consider writing your retina image CSS manually in a single media query.</strong></p><figureclass=highlight><pre><codeclass=language-scssdata-lang=scss><spanclass=nc>.img-retina</span><spanclass=o>(@</span><spanclass=nt>file-1x</span><spanclass=p>;</span><spanclass=k>@file-2x</span><spanclass=p>;</span><spanclass=k>@width-1x</span><spanclass=p>;</span><spanclass=k>@height-1x</span><spanclass=o>)</span><spanclass=p>{</span>
<spanclass=p>}</span></code></pre></figure></div><divclass=bs-docs-section><h1id=sassclass=page-header>Using Sass</h1><pclass=lead>While Bootstrap is built on Less, it also has an <ahref=https://github.com/twbs/bootstrap-sass>official Sass port</a>. We maintain it in a separate GitHub repository and handle updates with a conversion script.</p><h2id=sass-contents>What's included</h2><p>Since the Sass port has a separate repo and serves a slightly different audience, the contents of the project differ greatly from the main Bootstrap project. This ensures the Sass port is as compatible with as many Sass-based systems as possible.</p><divclass=table-responsive><tableclass="table table-bordered table-striped"><thead><tr><th>Path</th><th>Description</th></tr></thead><tbody><tr><thscope=row><code>lib/</code></th><td>Ruby gem code (Sass configuration, Rails and Compass integrations)</td></tr><tr><thscope=row><code>tasks/</code></th><td>Converter scripts (turning upstream Less to Sass)</td></tr><tr><thscope=row><code>test/</code></th><td>Compilation tests</td></tr><tr><thscope=row><code>templates/</code></th><td>Compass package manifest</td></tr><tr><thscope=row><code>vendor/assets/</code></th><td>Sass, JavaScript, and font files</td></tr><tr><thscope=row><code>Rakefile</code></th><td>Internal tasks, such as rake and convert</td></tr></tbody></table></div><p>Visit the <ahref=https://github.com/twbs/bootstrap-sass>Sass port's GitHub repository</a> to see these files in action.</p><h2id=sass-installation>Installation</h2><p>For information on how to install and use Bootstrap for Sass, consult the <ahref=https://github.com/twbs/bootstrap-sass>GitHub repository readme</a>. It's the most up to date source and includes information for use with Rails, Compass, and standard Sass projects.</p><p><aclass="btn btn-lg btn-outline"href=https://github.com/twbs/bootstrap-sass>Bootstrap for Sass</a></p></div></div><divclass=col-md-3role=complementary><navclass="bs-docs-sidebar hidden-print hidden-xs hidden-sm"><ulclass="nav bs-docs-sidenav"><li><ahref=#overview>Overview</a><ulclass=nav><li><ahref=#overview-doctype>HTML5 doctype</a></li><li><ahref=#overview-mobile>Mobile first</a></li><li><ahref=#overview-type-links>Typography and links</a></li><li><ahref=#overview-normalize>Normalize.css</a></li><li><ahref=#overview-container>Containers</a></li></ul></li><li><ahref=#grid>Grid system</a><ulclass=nav><li><ahref=#grid-intro>Introduction</a></li><li><ahref=#grid-media-queries>Media queries</a></li><li><ahref=#grid-options>Grid options</a></li><li><ahref=#grid-example-basic>Ex: Stacked-to-horizontal</a></li><li><ahref=#grid-example-fluid>Ex: Fluid container</a></li><li><ahref=#grid-example-mixed>Ex: Mobile and desktop</a></li><li><ahref=#grid-example-mixed-complete>Ex: Mobile, tablet, desktop</a></li><li><ahref=#grid-example-wrapping>Ex: Column wrapping</a></li><li><ahref=#grid-responsive-resets>Responsive column resets</a></li><li><ahref=#grid-offsetting>Offsetting columns</a></li><li><ahref=#grid-nesting>Nesting columns</a></li><li><ahref=#grid-column-ordering>Column ordering</a></li><li><ahref=#grid-less>Less mixins and variables</a></li></ul></li><li><ahref=#type>Typography</a><ulclass=nav><li><ahref=#type-headings>Headings</a></li><li><ahref=#type-body-copy>Body copy</a></li><li><ahref=#type-inline-text>Inline text elements</a></li><li><ahref=#type-alignment>Alignment classes</a></li><li><ahref=#type-transformation>Transformation classes</a></li><li><ahref=#type-abbreviations>Abbreviations</a></li><li><ahref=#type-addresses>Addresses</a></li><li><ahref=#type-blockquotes>Blockquotes</a></li><li><ahref=#type-lists>Lists</a></li></ul></li><li><ahref=#code>Code</a><ulclass=nav><li><ahref=#code-inline>Inline</a></li><li><ahref=#code-user-input>User input</a></li><li><ahref=#code-block>Basic block</a></li><li><ahref=#code-variables>Variables</a></li><li><ahref=#code-sample-output>Sample