base-css.mustache 93.97 KiB
<!-- Subhead
================================================== -->
<header class="jumbotron subhead" id="overview">
  <div class="container">
    <h1>{{_i}}Base CSS{{/i}}</h1>
    <p class="lead">{{_i}}Fundamental HTML elements styled and enhanced with extensible classes.{{/i}}</p>
  </div>
</header>
  <div class="container">
    <!-- Docs nav
    ================================================== -->
    <div class="row">
      <div class="span3 bs-docs-sidebar">
        <ul class="nav nav-list bs-docs-sidenav">
          <li><a href="#typography"><i class="glyphicon-chevron-right"></i> {{_i}}Typography{{/i}}</a></li>
          <li><a href="#code"><i class="glyphicon-chevron-right"></i> {{_i}}Code{{/i}}</a></li>
          <li><a href="#tables"><i class="glyphicon-chevron-right"></i> {{_i}}Tables{{/i}}</a></li>
          <li><a href="#forms"><i class="glyphicon-chevron-right"></i> {{_i}}Forms{{/i}}</a></li>
          <li><a href="#buttons"><i class="glyphicon-chevron-right"></i> {{_i}}Buttons{{/i}}</a></li>
          <li><a href="#images"><i class="glyphicon-chevron-right"></i> {{_i}}Images{{/i}}</a></li>
          <li><a href="#icons"><i class="glyphicon-chevron-right"></i> {{_i}}Icons by Glyphicons{{/i}}</a></li>
        </ul>
      </div>
      <div class="span9">
        <!-- Typography
        ================================================== -->
        <section id="typography">
          <div class="page-header">
            <h1>{{_i}}Typography{{/i}}</h1>
          </div>
          {{! Headings }}
          <h2 id="headings">{{_i}}Headings{{/i}}</h2>
          <p>{{_i}}All HTML headings, <code>&lt;h1&gt;</code> through <code>&lt;h6&gt;</code> are available.{{/i}}</p>
          <div class="bs-docs-example">
            <h1>h1. {{_i}}Heading 1{{/i}}</h1>
            <h2>h2. {{_i}}Heading 2{{/i}}</h2>
            <h3>h3. {{_i}}Heading 3{{/i}}</h3>
            <h4>h4. {{_i}}Heading 4{{/i}}</h4>
            <h5>h5. {{_i}}Heading 5{{/i}}</h5>
            <h6>h6. {{_i}}Heading 6{{/i}}</h6>
          </div>
          {{! Body copy }}
          <h2 id="body-copy">{{_i}}Body copy{{/i}}</h2>
          <p>{{_i}}Bootstrap's global default <code>font-size</code> is <strong>14px</strong>, with a <code>line-height</code> of <strong>20px</strong>. This is applied to the <code>&lt;body&gt;</code> and all paragraphs. In addition, <code>&lt;p&gt;</code> (paragraphs) receive a bottom margin of half their line-height (10px by default).{{/i}}</p>
          <div class="bs-docs-example">
            <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>
          <pre class="prettyprint">&lt;p&gt;...&lt;/p&gt;</pre>
          {{! Body copy .lead }}
          <h3>{{_i}}Lead body copy{{/i}}</h3>
          <p>{{_i}}Make a paragraph stand out by adding <code>.lead</code>.{{/i}}</p>
          <div class="bs-docs-example">
            <p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p>
          </div>
          <pre class="prettyprint">&lt;p class="lead"&gt;...&lt;/p&gt;</pre>
          {{! Using LESS }}
          <h3>{{_i}}Built with Less{{/i}}</h3>
          <p>{{_i}}The typographic scale is based on two LESS variables in <strong>variables.less</strong>: <code>@baseFontSize</code> and <code>@baseLineHeight</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.{{/i}}</p>
7172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
<hr class="bs-docs-separator"> {{! Emphasis }} <h2 id="emphasis">{{_i}}Emphasis{{/i}}</h2> <p>{{_i}}Make use of HTML's default emphasis tags with lightweight styles.{{/i}}</p> <h3><code>&lt;small&gt;</code></h3> <p>{{_i}}For de-emphasizing inline or blocks of text, <small>use the small tag.</small>{{/i}}</p> <div class="bs-docs-example"> <p><small>This line of text is meant to be treated as fine print.</small></p> </div> <pre class="prettyprint"> &lt;p&gt; &lt;small&gt;This line of text is meant to be treated as fine print.&lt;/small&gt; &lt;/p&gt; </pre> <h3>{{_i}}Bold{{/i}}</h3> <p>{{_i}}For emphasizing a snippet of text with a heavier font-weight.{{/i}}</p> <div class="bs-docs-example"> <p>The following snippet of text is <strong>rendered as bold text</strong>.</p> </div> <pre class="prettyprint">&lt;strong&gt;rendered as bold text&lt;/strong&gt;</pre> <h3>{{_i}}Italics{{/i}}</h3> <p>{{_i}}For emphasizing a snippet of text with italics.{{/i}}</p> <div class="bs-docs-example"> <p>The following snippet of text is <em>rendered as italicized text</em>.</p> </div> <pre class="prettyprint">&lt;em&gt;rendered as italicized text&lt;/em&gt;</pre> <p><span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}}Feel free to use <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> in HTML5. <code>&lt;b&gt;</code> is meant to highlight words or phrases without conveying additional importance while <code>&lt;i&gt;</code> is mostly for voice, technical terms, etc.{{/i}}</p> <h3>{{_i}}Emphasis classes{{/i}}</h3> <p>{{_i}}Convey meaning through color with a handful of emphasis utility classes.{{/i}}</p> <div class="bs-docs-example"> <p class="muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p> <p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p> <p class="text-error">Donec ullamcorper nulla non metus auctor fringilla.</p> <p class="text-info">Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.</p> <p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p> </div> <pre class="prettyprint linenums"> &lt;p class="muted"&gt;Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.&lt;/p&gt; &lt;p class="text-warning"&gt;Etiam porta sem malesuada magna mollis euismod.&lt;/p&gt; &lt;p class="text-error"&gt;Donec ullamcorper nulla non metus auctor fringilla.&lt;/p&gt; &lt;p class="text-info"&gt;Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.&lt;/p&gt; &lt;p class="text-success"&gt;Duis mollis, est non commodo luctus, nisi erat porttitor ligula.&lt;/p&gt; </pre> <hr class="bs-docs-separator"> {{! Abbreviations }} <h2 id="abbreviations">{{_i}}Abbreviations{{/i}}</h2> <p>{{_i}}Stylized implementation of HTML's <code>&lt;abbr&gt;</code> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a <code>title</code> attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.{{/i}}</p> <h3><code>&lt;abbr&gt;</code></h3> <p>{{_i}}For expanded text on long hover of an abbreviation, include the <code>title</code> attribute.{{/i}}</p> <div class="bs-docs-example"> <p>{{_i}}An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.{{/i}}</p> </div> <pre class="prettyprint">&lt;abbr title="attribute"&gt;attr&lt;/abbr&gt;</pre> <h3><code>&lt;abbr class="initialism"&gt;</code></h3> <p>{{_i}}Add <code>.initialism</code> to an abbreviation for a slightly smaller font-size.{{/i}}</p>
141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
<div class="bs-docs-example"> <p>{{_i}}<abbr title="HyperText Markup Language" class="initialism">HTML</abbr> is the best thing since sliced bread.{{/i}}</p> </div> <pre class="prettyprint">&lt;abbr title="HyperText Markup Language" class="initialism"&gt;HTML&lt;/abbr&gt;</pre> <hr class="bs-docs-separator"> {{! Addresses }} <h2 id="addresses">{{_i}}Addresses{{/i}}</h2> <p>{{_i}}Present contact information for the nearest ancestor or the entire body of work.{{/i}}</p> <h3><code>&lt;address&gt;</code></h3> <p>{{_i}}Preserve formatting by ending all lines with <code>&lt;br&gt;</code>.{{/i}}</p> <div class="bs-docs-example"> <address> <strong>Twitter, Inc.</strong><br> 795 Folsom Ave, Suite 600<br> San Francisco, CA 94107<br> <abbr title="Phone">P:</abbr> (123) 456-7890 </address> <address> <strong>{{_i}}Full Name{{/i}}</strong><br> <a href="mailto:#">{{_i}}first.last@example.com{{/i}}</a> </address> </div> <pre class="prettyprint linenums"> &lt;address&gt; &lt;strong&gt;Twitter, Inc.&lt;/strong&gt;&lt;br&gt; 795 Folsom Ave, Suite 600&lt;br&gt; San Francisco, CA 94107&lt;br&gt; &lt;abbr title="Phone"&gt;P:&lt;/abbr&gt; (123) 456-7890 &lt;/address&gt; &lt;address&gt; &lt;strong&gt;{{_i}}Full Name{{/i}}&lt;/strong&gt;&lt;br&gt; &lt;a href="mailto:#"&gt;{{_i}}first.last@example.com{{/i}}&lt;/a&gt; &lt;/address&gt; </pre> <hr class="bs-docs-separator"> {{! Blockquotes }} <h2 id="blockquotes">{{_i}}Blockquotes{{/i}}</h2> <p>{{_i}}For quoting blocks of content from another source within your document.{{/i}}</p> <h3>{{_i}}Default blockquote{{/i}}</h3> <p>{{_i}}Wrap <code>&lt;blockquote&gt;</code> around any <abbr title="HyperText Markup Language">HTML</abbr> as the quote. For straight quotes we recommend a <code>&lt;p&gt;</code>.{{/i}}</p> <div class="bs-docs-example"> <blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> </blockquote> </div> <pre class="prettyprint linenums"> &lt;blockquote&gt; &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.&lt;/p&gt; &lt;/blockquote&gt; </pre> <h3>{{_i}}Blockquote options{{/i}}</h3> <p>{{_i}}Style and content changes for simple variations on a standard blockquote.{{/i}}</p> <h4>{{_i}}Naming a source{{/i}}</h4> <p>{{_i}}Add <code>&lt;small&gt;</code> tag for identifying the source. Wrap the name of the source work in <code>&lt;cite&gt;</code>.{{/i}}</p> <div class="bs-docs-example"> <blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
<small>{{_i}}Someone famous in <cite title="Source Title">Source Title</cite>{{/i}}</small> </blockquote> </div> <pre class="prettyprint linenums"> &lt;blockquote&gt; &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.&lt;/p&gt; &lt;small&gt;{{_i}}Someone famous &lt;cite title="Source Title"&gt;Source Title&lt;/cite&gt;{{/i}}&lt;/small&gt; &lt;/blockquote&gt; </pre> <h4>{{_i}}Alternate displays{{/i}}</h4> <p>{{_i}}Use <code>.pull-right</code> for a floated, right-aligned blockquote.{{/i}}</p> <div class="bs-docs-example" style="overflow: hidden;"> <blockquote class="pull-right"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> <small>{{_i}}Someone famous in <cite title="Source Title">Source Title</cite>{{/i}}</small> </blockquote> </div> <pre class="prettyprint linenums"> &lt;blockquote class="pull-right"&gt; ... &lt;/blockquote&gt; </pre> <hr class="bs-docs-separator"> <!-- Lists --> <h2 id="lists">{{_i}}Lists{{/i}}</h2> <h3>{{_i}}Unordered{{/i}}</h3> <p>{{_i}}A list of items in which the order does <em>not</em> explicitly matter.{{/i}}</p> <div class="bs-docs-example"> <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> <pre class="prettyprint linenums"> &lt;ul&gt; &lt;li&gt;...&lt;/li&gt; &lt;/ul&gt; </pre> <h3>{{_i}}Ordered{{/i}}</h3> <p>{{_i}}A list of items in which the order <em>does</em> explicitly matter.{{/i}}</p> <div class="bs-docs-example"> <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>
281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
</ol> </div> <pre class="prettyprint linenums"> &lt;ol&gt; &lt;li&gt;...&lt;/li&gt; &lt;/ol&gt; </pre> <h3>{{_i}}Unstyled{{/i}}</h3> <p>{{_i}}Remove the default <code>list-style</code> and left padding on list items (immediate children only).{{/i}}</p> <div class="bs-docs-example"> <ul class="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> <pre class="prettyprint linenums"> &lt;ul class="list-unstyled"&gt; &lt;li&gt;...&lt;/li&gt; &lt;/ul&gt; </pre> <h3>{{_i}}Inline{{/i}}</h3> <p>{{_i}}Place all list items on a single line with <code>inline-block</code> and some light padding.{{/i}}</p> <div class="bs-docs-example"> <ul class="list-inline"> <li>Lorem ipsum</li> <li>Phasellus iaculis</li> <li>Nulla volutpat</li> </ul> </div> <pre class="prettyprint linenums"> &lt;ul class="list-inline"&gt; &lt;li&gt;...&lt;/li&gt; &lt;/ul&gt; </pre> <h3>{{_i}}Description{{/i}}</h3> <p>{{_i}}A list of terms with their associated descriptions.{{/i}}</p> <div class="bs-docs-example"> <dl> <dt>{{_i}}Description lists{{/i}}</dt> <dd>{{_i}}A description list is perfect for defining terms.{{/i}}</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> <pre class="prettyprint linenums"> &lt;dl&gt; &lt;dt&gt;...&lt;/dt&gt; &lt;dd&gt;...&lt;/dd&gt; &lt;/dl&gt; </pre>
351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
<h4>{{_i}}Horizontal description{{/i}}</h4> <p>{{_i}}Make terms and descriptions in <code>&lt;dl&gt;</code> line up side-by-side.{{/i}}</p> <div class="bs-docs-example"> <dl class="dl-horizontal"> <dt>{{_i}}Description lists{{/i}}</dt> <dd>{{_i}}A description list is perfect for defining terms.{{/i}}</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> <pre class="prettyprint linenums"> &lt;dl class="dl-horizontal"&gt; &lt;dt&gt;...&lt;/dt&gt; &lt;dd&gt;...&lt;/dd&gt; &lt;/dl&gt; </pre> <p> <span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}}Horizontal description lists will truncate terms that are too long to fit in the left column fix <code>text-overflow</code>. In narrower viewports, they will change to the default stacked layout.{{/i}} </p> </section> <!-- Code ================================================== --> <section id="code"> <div class="page-header"> <h1>{{_i}}Code{{/i}}</h1> </div> <h2>Inline</h2> <p>Wrap inline snippets of code with <code>&lt;code&gt;</code>.</p> <div class="bs-docs-example"> For example, <code>&lt;section&gt;</code> should be wrapped as inline. </div> <pre class="prettyprint linenums"> {{_i}}For example, &lt;code&gt;&lt;section&gt;&lt;/code&gt; should be wrapped as inline.{{/i}} </pre> <h2>Basic block</h2> <p>{{_i}}Use <code>&lt;pre&gt;</code> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.{{/i}}</p> <div class="bs-docs-example"> <pre>&lt;p&gt;{{_i}}Sample text here...{{/i}}&lt;/p&gt;</pre> </div> <pre class="prettyprint linenums" style="margin-bottom: 9px;"> &lt;pre&gt; &amp;lt;p&amp;gt;{{_i}}Sample text here...{{/i}}&amp;lt;/p&amp;gt; &lt;/pre&gt; </pre> <p><span class="label label-info">{{_i}}Heads up!{{/i}}</span> {{_i}}Be sure to keep code within <code>&lt;pre&gt;</code> tags as close to the left as possible; it will render all tabs.{{/i}}</p> <p>{{_i}}You may optionally add the <code>.pre-scrollable</code> class which will set a max-height of 350px and provide a y-axis scrollbar.{{/i}}</p> </section> <!-- Tables ================================================== --> <section id="tables"> <div class="page-header"> <h1>{{_i}}Tables{{/i}}</h1> </div> <h2>{{_i}}Default styles{{/i}}</h2> <p>{{_i}}For basic styling&mdash;light padding and only horizontal dividers&mdash;add the base class <code>.table</code> to any <code>&lt;table&gt;</code>.{{/i}}</p>
421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
<div class="bs-docs-example"> <table class="table"> <thead> <tr> <th>#</th> <th>{{_i}}First Name{{/i}}</th> <th>{{_i}}Last Name{{/i}}</th> <th>{{_i}}Username{{/i}}</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div>{{! /example }} <pre class="prettyprint linenums"> &lt;table class="table"&gt; … &lt;/table&gt; </pre> <hr class="bs-docs-separator"> <h2>{{_i}}Optional classes{{/i}}</h2> <p>{{_i}}Add any of the following classes to the <code>.table</code> base class.{{/i}}</p> <h3><code>{{_i}}.table-striped{{/i}}</code></h3> <p>{{_i}}Adds zebra-striping to any table row within the <code>&lt;tbody&gt;</code> via the <code>:nth-child</code> CSS selector (not available in IE8).{{/i}}</p> <div class="bs-docs-example"> <table class="table table-striped"> <thead> <tr> <th>#</th> <th>{{_i}}First Name{{/i}}</th> <th>{{_i}}Last Name{{/i}}</th> <th>{{_i}}Username{{/i}}</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr>
491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
<tr> <td>3</td> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div>{{! /example }} <pre class="prettyprint linenums" style="margin-bottom: 18px;"> &lt;table class="table table-striped"&gt; … &lt;/table&gt; </pre> <h3><code>{{_i}}.table-bordered{{/i}}</code></h3> <p>{{_i}}Add borders and rounded corners to the table.{{/i}}</p> <div class="bs-docs-example"> <table class="table table-bordered"> <thead> <tr> <th>#</th> <th>{{_i}}First Name{{/i}}</th> <th>{{_i}}Last Name{{/i}}</th> <th>{{_i}}Username{{/i}}</th> </tr> </thead> <tbody> <tr> <td rowspan="2">1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>Mark</td> <td>Otto</td> <td>@TwBootstrap</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td colspan="2">Larry the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div>{{! /example }} <pre class="prettyprint linenums"> &lt;table class="table table-bordered"&gt; … &lt;/table&gt; </pre> <h3><code>{{_i}}.table-hover{{/i}}</code></h3> <p>{{_i}}Enable a hover state on table rows within a <code>&lt;tbody&gt;</code>.{{/i}}</p> <div class="bs-docs-example"> <table class="table table-hover"> <thead> <tr> <th>#</th> <th>{{_i}}First Name{{/i}}</th> <th>{{_i}}Last Name{{/i}}</th> <th>{{_i}}Username{{/i}}</th> </tr>
561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
</thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td colspan="2">Larry the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div>{{! /example }} <pre class="prettyprint linenums" style="margin-bottom: 18px;"> &lt;table class="table table-hover"&gt; … &lt;/table&gt; </pre> <h3><code>{{_i}}.table-condensed{{/i}}</code></h3> <p>{{_i}}Makes tables more compact by cutting cell padding in half.{{/i}}</p> <div class="bs-docs-example"> <table class="table table-condensed"> <thead> <tr> <th>#</th> <th>{{_i}}First Name{{/i}}</th> <th>{{_i}}Last Name{{/i}}</th> <th>{{_i}}Username{{/i}}</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td colspan="2">Larry the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div>{{! /example }} <pre class="prettyprint linenums" style="margin-bottom: 18px;"> &lt;table class="table table-condensed"&gt; … &lt;/table&gt; </pre> <hr class="bs-docs-separator">
631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700
<h2>{{_i}}Optional row classes{{/i}}</h2> <p>{{_i}}Use contextual classes to color table rows.{{/i}}</p> <table class="table table-bordered table-striped"> <colgroup> <col class="span1"> <col class="span7"> </colgroup> <thead> <tr> <th>{{_i}}Class{{/i}}</th> <th>{{_i}}Description{{/i}}</th> </tr> </thead> <tbody> <tr> <td> <code>.success</code> </td> <td>{{_i}}Indicates a successful or positive action.{{/i}}</td> </tr> <tr> <td> <code>.error</code> </td> <td>{{_i}}Indicates a dangerous or potentially negative action.{{/i}}</td> </tr> <tr> <td> <code>.warning</code> </td> <td>{{_i}}Indicates a warning that might need attention.{{/i}}</td> </tr> <tr> <td> <code>.info</code> </td> <td>{{_i}}Used as an alternative to the default styles.{{/i}}</td> </tr> </tbody> </table> <div class="bs-docs-example"> <table class="table"> <thead> <tr> <th>#</th> <th>{{_i}}Product{{/i}}</th> <th>{{_i}}Payment Taken{{/i}}</th> <th>{{_i}}Status{{/i}}</th> </tr> </thead> <tbody> <tr class="success"> <td>1</td> <td>TB - Monthly</td> <td>01/04/2012</td> <td>Approved</td> </tr> <tr class="error"> <td>2</td> <td>TB - Monthly</td> <td>02/04/2012</td> <td>Declined</td> </tr> <tr class="warning"> <td>3</td> <td>TB - Monthly</td> <td>03/04/2012</td> <td>Pending</td> </tr>
701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770
<tr class="info"> <td>4</td> <td>TB - Monthly</td> <td>04/04/2012</td> <td>Call in to confirm</td> </tr> </tbody> </table> </div>{{! /example }} <pre class="prettyprint linenums"> ... &lt;tr class="success"&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;TB - Monthly&lt;/td&gt; &lt;td&gt;01/04/2012&lt;/td&gt; &lt;td&gt;Approved&lt;/td&gt; &lt;/tr&gt; ... </pre> <hr class="bs-docs-separator"> <h2>{{_i}}Supported table markup{{/i}}</h2> <p>{{_i}}List of supported table HTML elements and how they should be used.{{/i}}</p> <table class="table table-bordered table-striped"> <colgroup> <col class="span1"> <col class="span7"> </colgroup> <thead> <tr> <th>{{_i}}Tag{{/i}}</th> <th>{{_i}}Description{{/i}}</th> </tr> </thead> <tbody> <tr> <td> <code>&lt;table&gt;</code> </td> <td> {{_i}}Wrapping element for displaying data in a tabular format{{/i}} </td> </tr> <tr> <td> <code>&lt;thead&gt;</code> </td> <td> {{_i}}Container element for table header rows (<code>&lt;tr&gt;</code>) to label table columns{{/i}} </td> </tr> <tr> <td> <code>&lt;tbody&gt;</code> </td> <td> {{_i}}Container element for table rows (<code>&lt;tr&gt;</code>) in the body of the table{{/i}} </td> </tr> <tr> <td> <code>&lt;tr&gt;</code> </td> <td> {{_i}}Container element for a set of table cells (<code>&lt;td&gt;</code> or <code>&lt;th&gt;</code>) that appears on a single row{{/i}} </td> </tr>