diff --git a/docs/base-css.html b/docs/base-css.html index 88f4436424..175825c714 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -68,26 +68,17 @@
On top of the scaffolding, basic HTML elements are styled and enhanced with extensible classes to provide a fresh, consistent look and feel.
-All HTML headings, <h1>
through <h6>
are available.
All HTML headings, <h1>
through <h6>
are available.
Bootstrap's global default font-size
is 14px, with a line-height
of 20px. This is applied to the <body>
and all paragraphs. In addition, <p>
(paragraphs) receive a bottom margin of half their line-height (9px by default).
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.
-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.
-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.
-Bootstrap's global default font-size
is 14px, with a line-height
of 20px. This is applied to the <body>
and all paragraphs. In addition, <p>
(paragraphs) receive a bottom margin of half their line-height (9px by default).
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.
+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.
+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.
+Make a paragraph stand out by adding .lead
.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
-Make a paragraph stand out by adding .lead
.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
+The typographic scale is based on two LESS variables in variables.less: @baseFontSize
and @baseLineHeight
. 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.
The typographic scale is based on two LESS variables in variables.less: @baseFontSize
and @baseLineHeight
. 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.
Make use of HTML's default emphasis tags, <strong>
and <em>
.
Make use of HTML's default emphasis tags, <strong>
and <em>
.
<strong>
For emphasizing a snippet of text with important
-The following snippet of text is rendered as bold text.
-<strong>
For emphasizing a snippet of text with important
+The following snippet of text is rendered as bold text.
+<strong>rendered as bold text</strong>-
<em>
For emphasizing a snippet of text with stress
-The following snippet of text is rendered as italicized text.
--<em>rendered as italicized text</em> -+
<em>
For emphasizing a snippet of text with stress
+The following snippet of text is rendered as italicized text.
++ <em>rendered as italicized text</em> +-
Heads up! Feel free to use <b>
and <i>
in HTML5. <b>
is meant to highlight words or phrases without conveying additional importance while <i>
is mostly for voice, technical terms, etc.
Heads up! Feel free to use <b>
and <i>
in HTML5. <b>
is meant to highlight words or phrases without conveying additional importance while <i>
is mostly for voice, technical terms, etc.
Stylized implemenation of HTML's <abbr>
element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title
attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.
Stylized implemenation of HTML's <abbr>
element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title
attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.
<abbr>
For expanded text on long hover of an abbreviation, include the title
attribute.
An abbreviation of the word attribute is attr.
-<abbr>
For expanded text on long hover of an abbreviation, include the title
attribute.
An abbreviation of the word attribute is attr.
+<abbr title="attribute">attr</abbr>-
<abbr class="initialism">
Add .initialism
to an abbreviation for a slightly smaller font-size.
HTML is the best thing since sliced bread.
-<abbr class="initialism">
Add .initialism
to an abbreviation for a slightly smaller font-size.
HTML is the best thing since sliced bread.
+<abbr title="attribute" class="initialism">attr</abbr>-
Present contact information for the nearest ancestor or the entire body of work.
+Present contact information for the nearest ancestor or the entire body of work.
-<address>
Preserve formatting by ending all lines with <br>
.
<address>
Preserve formatting by ending all lines with <br>
.
<address> <strong>Twitter, Inc.</strong><br> @@ -226,36 +217,36 @@-
For quoting blocks of content from another source within your document.
+For quoting blocks of content from another source within your document.
-Wrap <blockquote>
around any HTML as the quote. For straight quotes we recommend a <p>
.
--Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
-
Wrap <blockquote>
around any HTML as the quote. For straight quotes we recommend a <p>
.
++Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
+
<blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> </blockquote>-
Style and content changes for simple variations on a standard blockquote.
+Style and content changes for simple variations on a standard blockquote.
-Add <small>
tag for identifying the source. Wrap the name of the source work in <cite>
.
--Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
- Someone famous in Source Title -
Add <small>
tag for identifying the source. Wrap the name of the source work in <cite>
.
++Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
+ Someone famous in Source Title +
<blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> @@ -263,14 +254,14 @@ </blockquote>-
Use .pull-left
and .pull-right
classes for floated, right-aligned blockquote content.
--Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
- Someone famous in Source Title -
Use .pull-left
and .pull-right
classes for floated, right-aligned blockquote content.
++Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
+ Someone famous in Source Title +
<blockquote class="pull-right"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> @@ -279,99 +270,99 @@-
A list of items in which the order does not explicitly matter.
-A list of items in which the order does not explicitly matter.
+<ul> <li>...</li> </ul>-
A list of items in which the order does explicitly matter.
-A list of items in which the order does explicitly matter.
+<ol> <li>...</li> </ol>-
A list of items with no list-style
or additional left padding.
A list of items with no list-style
or additional left padding.
<ul class="unstyled"> <li>...</li> </ul>-
A list of terms with their associated descriptions.
-A list of terms with their associated descriptions.
+<dl> <dt>...</dt> @@ -379,21 +370,21 @@ </dl>-
Make terms and descriptions in <dl>
line up side-by-side.
Make terms and descriptions in <dl>
line up side-by-side.
<dl class="dl-horizontal"> <dt>...</dt> @@ -401,28 +392,28 @@ </dl>
- Heads up!
- Horizontal description lists will truncate terms that are too long to fit in the left column fix text-overflow
. In narrower viewports, they will change to the default stacked layout.
-
text-overflow
. In narrower viewports, they will change to the default stacked layout.
+
+ Wrap inline snippets of code with <code>
.
Wrap inline snippets of code with <code>
.
For example, <code>section</code> should be wrapped as inline.-
Use <pre>
for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.
Use <pre>
for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.
<p>Sample text here...</p>@@ -431,53 +422,53 @@ For example, <code>section</code> should be wrapped as inline. <p>Sample text here...</p> </pre> -
Note: Be sure to keep code within <pre>
tags as close to the left as possible; it will render all tabs.
You may optionally add the .pre-scrollable
class which will set a max-height of 350px and provide a y-axis scrollbar.
Note: Be sure to keep code within <pre>
tags as close to the left as possible; it will render all tabs.
You may optionally add the .pre-scrollable
class which will set a max-height of 350px and provide a y-axis scrollbar.
For basic styling—light padding and only horizontal dividers—add the base class .table
to any <table>
.
# | -First Name | -Last Name | -Username | -
---|---|---|---|
1 | -Mark | -Otto | -@mdo | -
2 | -Jacob | -Thornton | -@fat | -
3 | -Larry | -the Bird | -
For basic styling—light padding and only horizontal dividers—add the base class .table
to any <table>
.
# | +First Name | +Last Name | +Username | +
---|---|---|---|
1 | +Mark | +Otto | +@mdo | +
2 | +Jacob | +Thornton | +@fat | +
3 | +Larry | +the Bird | +
<table class="table"> … @@ -485,168 +476,168 @@ For example, <code>section</code> should be wrapped as inline.-
Add any of the follow classes to the .table
base class.
Add any of the follow classes to the .table
base class.
.table-striped
Adds zebra-striping to any table row within the <tbody>
via the :nth-child
CSS selector (not available in IE7-IE8).
# | -First Name | -Last Name | -Username | -
---|---|---|---|
1 | -Mark | -Otto | -@mdo | -
2 | -Jacob | -Thornton | -@fat | -
3 | -Larry | -the Bird | -
.table-striped
Adds zebra-striping to any table row within the <tbody>
via the :nth-child
CSS selector (not available in IE7-IE8).
# | +First Name | +Last Name | +Username | +
---|---|---|---|
1 | +Mark | +Otto | +@mdo | +
2 | +Jacob | +Thornton | +@fat | +
3 | +Larry | +the Bird | +
<table class="table table-striped"> … </table>-
.table-bordered
Add borders and rounded corners to the table.
-# | -First Name | -Last Name | -Username | -
---|---|---|---|
1 | -Mark | -Otto | -@mdo | -
Mark | -Otto | -@TwBootstrap | -|
2 | -Jacob | -Thornton | -@fat | -
3 | -Larry the Bird | -
.table-bordered
Add borders and rounded corners to the table.
+# | +First Name | +Last Name | +Username | +
---|---|---|---|
1 | +Mark | +Otto | +@mdo | +
Mark | +Otto | +@TwBootstrap | +|
2 | +Jacob | +Thornton | +@fat | +
3 | +Larry the Bird | +
<table class="table table-bordered"> … </table>-
.table-hover
Enable a hover state on table rows within a <tbody>
.
# | -First Name | -Last Name | -Username | -
---|---|---|---|
1 | -Mark | -Otto | -@mdo | -
2 | -Jacob | -Thornton | -@fat | -
3 | -Larry the Bird | -
.table-hover
Enable a hover state on table rows within a <tbody>
.
# | +First Name | +Last Name | +Username | +
---|---|---|---|
1 | +Mark | +Otto | +@mdo | +
2 | +Jacob | +Thornton | +@fat | +
3 | +Larry the Bird | +
<table class="table table-hover"> … </table>-
.table-condensed
Makes tables more compact by cutting cell padding in half.
-# | -First Name | -Last Name | -Username | -
---|---|---|---|
1 | -Mark | -Otto | -@mdo | -
2 | -Jacob | -Thornton | -@fat | -
3 | -Larry the Bird | -
.table-condensed
Makes tables more compact by cutting cell padding in half.
+# | +First Name | +Last Name | +Username | +
---|---|---|---|
1 | +Mark | +Otto | +@mdo | +
2 | +Jacob | +Thornton | +@fat | +
3 | +Larry the Bird | +
<table class="table table-condensed"> … @@ -654,82 +645,82 @@ For example, <code>section</code> should be wrapped as inline.-
List of supported table HTML elements and how they should be used.
-Tag | -Description | -
---|---|
- <table>
- |
- - Wrapping element for displaying data in a tabular format - | -
- <thead>
- |
-
- Container element for table header rows (<tr> ) to label table columns
- |
-
- <tbody>
- |
-
- Container element for table rows (<tr> ) in the body of the table
- |
-
- <tr>
- |
-
- Container element for a set of table cells (<td> or <th> ) that appears on a single row
- |
-
- <td>
- |
- - Default table cell - | -
- <th>
- |
-
- Special table cell for column (or row, depending on scope and placement) labels - Must be used within a <thead>
- |
-
- <caption>
- |
- - Description or summary of what the table holds, especially useful for screen readers - | -
List of supported table HTML elements and how they should be used.
+Tag | +Description | +
---|---|
+ <table>
+ |
+ + Wrapping element for displaying data in a tabular format + | +
+ <thead>
+ |
+
+ Container element for table header rows (<tr> ) to label table columns
+ |
+
+ <tbody>
+ |
+
+ Container element for table rows (<tr> ) in the body of the table
+ |
+
+ <tr>
+ |
+
+ Container element for a set of table cells (<td> or <th> ) that appears on a single row
+ |
+
+ <td>
+ |
+ + Default table cell + | +
+ <th>
+ |
+
+ Special table cell for column (or row, depending on scope and placement) labels + Must be used within a <thead>
+ |
+
+ <caption>
+ |
+ + Description or summary of what the table holds, especially useful for screen readers + | +
<table> <thead> @@ -747,28 +738,28 @@ For example, <code>section</code> should be wrapped as inline. </table>-
Individual form controls receive styling, but without any required base class on the <form>
or large changes in markup. Results in stacked, left-aligned labels on top of form controls.
Individual form controls receive styling, but without any required base class on the <form>
or large changes in markup. Results in stacked, left-aligned labels on top of form controls.
<form class="well"> <label>Label name</label> @@ -782,18 +773,18 @@ For example, <code>section</code> should be wrapped as inline.-
Included with Bootstrap are three optional form layouts for common use cases.
+Included with Bootstrap are three optional form layouts for common use cases.
-Add .form-search
to the form and .search-query
to the <input>
for an extra-rounded text input.
Add .form-search
to the form and .search-query
to the <input>
for an extra-rounded text input.
<form class="form-search"> <input type="text" class="input-medium search-query"> @@ -801,16 +792,16 @@ For example, <code>section</code> should be wrapped as inline. </form>-
Add .form-inline
for left-aligned labels and inline-block controls for a compact layout.
Add .form-inline
for left-aligned labels and inline-block controls for a compact layout.
<form class="form-inline"> <input type="text" class="input-small" placeholder="Email"> @@ -822,36 +813,36 @@ For example, <code>section</code> should be wrapped as inline. </form>-
Right align labels and float them to the left to make them appear on the same line as controls. Requires the most markup changes from a default form:
-.form-horizontal
to the form.control-group
.control-label
to the label.controls
for proper alignmentRight align labels and float them to the left to make them appear on the same line as controls. Requires the most markup changes from a default form:
+.form-horizontal
to the form.control-group
.control-label
to the label.controls
for proper alignment<form class="form-horizontal"> <div class="control-group"> @@ -878,49 +869,49 @@ For example, <code>section</code> should be wrapped as inline.-
Examples of standard form controls supported in an example form layout.
+Examples of standard form controls supported in an example form layout.
-Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.
-Requires the use of a specified type
at all times.
Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.
+Requires the use of a specified type
at all times.
<input type="text" placeholder="Text input">-
Form control which supports multiple lines of text. Change row
attribute as necessary.
Form control which supports multiple lines of text. Change row
attribute as necessary.
<textarea id="textarea" rows="3"></textarea>-
Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.
-Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.
+<label class="checkbox"> <input type="checkbox" value=""> @@ -937,19 +928,19 @@ For example, <code>section</code> should be wrapped as inline. </label>-
Add the .inline
class to a series of checkboxes or radios for controls appear on the same line.
Add the .inline
class to a series of checkboxes or radios for controls appear on the same line.
<label class="checkbox inline"> <input type="checkbox" id="inlineCheckbox1" value="option1"> 1 @@ -962,25 +953,25 @@ For example, <code>section</code> should be wrapped as inline. </label>-
Use the default option or specify a multiple="multiple"
to show multiple options at once.
Use the default option or specify a multiple="multiple"
to show multiple options at once.
<select> <option>something</option> @@ -1000,28 +991,28 @@ For example, <code>section</code> should be wrapped as inline.-
Adding on top of existing browser controls, Bootstrap includes other useful form components.
+Adding on top of existing browser controls, Bootstrap includes other useful form components.
-Add text or buttons before or after any text-based input. Do note that select
elements are not supported here.
Add text or buttons before or after any text-based input. Do note that select
elements are not supported here.
Wrap a .add-on
and an input
with one of two classes to prepend or append text to an input.
Wrap a .add-on
and an input
with one of two classes to prepend or append text to an input.
<div class="input-prepend"> <span class="add-on">@</span><input class="span2" id="prependedInput" size="16" type="text" placeholder="Username"> @@ -1031,35 +1022,35 @@ For example, <code>section</code> should be wrapped as inline. </div>-
Use both classes and two instances of .add-on
to prepend and append an input.
Use both classes and two instances of .add-on
to prepend and append an input.
<div class="input-prepend input-append"> <span class="add-on">$</span><input class="span2" id="appendedPrependedInput" size="16" type="text"><span class="add-on">.00</span> </div>-
Instead of a <span>
with text, use a .btn
to attach a button (or two) to an input.
Instead of a <span>
with text, use a .btn
to attach a button (or two) to an input.
<div class="input-append"> <input class="span2" id="appendedInputButton" size="16" type="text"><button class="btn" type="button">Go!</button> @@ -1070,20 +1061,20 @@ For example, <code>section</code> should be wrapped as inline. </div>-
Use relative sizing classes like .input-large
or match your inputs to the grid column sizes using .span*
classes.
Use relative sizing classes like .input-large
or match your inputs to the grid column sizes using .span*
classes.
<input class="input-mini" type="text"> <input class="input-small" type="text"> @@ -1092,68 +1083,68 @@ For example, <code>section</code> should be wrapped as inline. <input class="input-xlarge" type="text"> <input class="input-xxlarge" type="text">-
- Heads up! In future versions, we'll be altering the use of these relative input classes to match our button sizes. For example, .input-large
will increase the padding and font-size of an input.
-
+ Heads up! In future versions, we'll be altering the use of these relative input classes to match our button sizes. For example, .input-large
will increase the padding and font-size of an input.
+
Use .span1
to .span12
for inputs that match the same sizes of the grid columns.
Use .span1
to .span12
for inputs that match the same sizes of the grid columns.
<input class="span1" type="text"> <input class="span2" type="text"> <input class="span3" type="text">-
For multiple grid inputs per line, use the .controls-row
modifier class for proper spacing. It floats the inputs to collapse white-space, sets the proper margins, and the clears the float.
For multiple grid inputs per line, use the .controls-row
modifier class for proper spacing. It floats the inputs to collapse white-space, sets the proper margins, and the clears the float.
<div class="controls controls-row"> <input class="span4" type="text" placeholder=".span4"> @@ -1161,23 +1152,23 @@ For example, <code>section</code> should be wrapped as inline. </div>-
Present data in a form that's not editable without using actual form markup.
- +Present data in a form that's not editable without using actual form markup.
+<span class="input-xlarge uneditable-input">Some value here</span>-
End a form with a group of actions (buttons). When placed within a .form-horizontal
, the buttons will automatically indent to line up with the form controls.
End a form with a group of actions (buttons). When placed within a .form-horizontal
, the buttons will automatically indent to line up with the form controls.
<div class="form-actions"> <button type="submit" class="btn btn-primary">Save changes</button> @@ -1185,76 +1176,76 @@ For example, <code>section</code> should be wrapped as inline. </div>-
Inline and block level support for help text that appears around form controls.
-Inline and block level support for help text that appears around form controls.
+<span class="help-inline">Inline help text</span>-
<span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>-
Provide feedback to users or visitors with basic feedback states on form controls and labels.
+Provide feedback to users or visitors with basic feedback states on form controls and labels.
-We remove the default outline
styles on some form controls and apply a box-shadow
in its place for :focus
.
We remove the default outline
styles on some form controls and apply a box-shadow
in its place for :focus
.
<input class="input-xlarge" id="focusedInput" type="text" value="This is focused...">-
Add the disabled
attribute on an input to prevent user input and trigger a slightly different look.
Add the disabled
attribute on an input to prevent user input and trigger a slightly different look.
<input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>-
Bootstrap includes validation styles for error, warning, and success messages. To use, add the appropriate class to the surrounding .control-group
.
Bootstrap includes validation styles for error, warning, and success messages. To use, add the appropriate class to the surrounding .control-group
.
<div class="control-group warning"> <label class="control-label" for="inputWarning">Input with warning</label> @@ -1279,133 +1270,133 @@ For example, <code>section</code> should be wrapped as inline. </div>-
Button styles can be applied to anything with the .btn
class applied. However, typically you'll want to apply these to only <a>
and <button>
elements for the best rendering.
Button | -class="" | -Description | -
---|---|---|
- | btn |
- Standard gray button with gradient | -
- | btn btn-primary |
- Provides extra visual weight and identifies the primary action in a set of buttons | -
- | btn btn-info |
- Used as an alternative to the default styles | -
- | btn btn-success |
- Indicates a successful or positive action | -
- | btn btn-warning |
- Indicates caution should be taken with this action | -
- | btn btn-danger |
- Indicates a dangerous or potentially negative action | -
- | btn btn-inverse |
- Alternate dark gray button, not tied to a semantic action or use | -
Button styles can be applied to anything with the .btn
class applied. However, typically you'll want to apply these to only <a>
and <button>
elements for the best rendering.
Button | +class="" | +Description | +
---|---|---|
+ | btn |
+ Standard gray button with gradient | +
+ | btn btn-primary |
+ Provides extra visual weight and identifies the primary action in a set of buttons | +
+ | btn btn-info |
+ Used as an alternative to the default styles | +
+ | btn btn-success |
+ Indicates a successful or positive action | +
+ | btn btn-warning |
+ Indicates caution should be taken with this action | +
+ | btn btn-danger |
+ Indicates a dangerous or potentially negative action | +
+ | btn btn-inverse |
+ Alternate dark gray button, not tied to a semantic action or use | +
IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button
elements, rendering text gray with a nasty text-shadow that we cannot fix.
IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button
elements, rendering text gray with a nasty text-shadow that we cannot fix.
Fancy larger or smaller buttons? Add .btn-large
, .btn-small
, or .btn-mini
for two additional sizes.
- - -
-- - -
-- - -
+Fancy larger or smaller buttons? Add .btn-large
, .btn-small
, or .btn-mini
for two additional sizes.
+ + +
++ + +
++ + +
-Make buttons look unclickable by fading them back 50%.
+Make buttons look unclickable by fading them back 50%.
-Add the .disabled
class to <a>
buttons.
- Primary link - Link -
+Add the .disabled
class to <a>
buttons.
+ Primary link + Link +
<a href="#" class="btn btn-large btn-primary disabled">Primary link</a> <a href="#" class="btn btn-large disabled">Link</a>-
- Heads up!
- We use .disabled
as a utility class here, similar to the common .active
class, so no prefix is required.
-
+ Heads up!
+ We use .disabled
as a utility class here, similar to the common .active
class, so no prefix is required.
+
Add the disabled
attribute to <button>
buttons.
- - -
+Add the disabled
attribute to <button>
buttons.
+ + +
<button type="button" class="btn btn-large btn-primary disabled" disabled="disabled">Primary button</button> <button type="button" class="btn btn-large" disabled>Button</button>-
Use the .btn
class on an <a>
, <button>
, or <input>
element.
Use the .btn
class on an <a>
, <button>
, or <input>
element.
<a class="btn" href="">Link</a> <button class="btn" type="submit"> @@ -1416,247 +1407,250 @@ For example, <code>section</code> should be wrapped as inline. <input class="btn" type="submit" value="Submit">-
As a best practice, try to match the element for you context to ensure matching cross-browser rendering. If you have an input
, use an <input type="submit">
for your button.
As a best practice, try to match the element for you context to ensure matching cross-browser rendering. If you have an input
, use an <input type="submit">
for your button.
140 icons in sprite form, available in dark gray (default) and white, provided by Glyphicons.
-140 icons in sprite form, available in dark gray (default) and white, provided by Glyphicons.
+Glyphicons Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creators have made this possible at not cost to you as developers. As a thank you, we ask you to include an optional link back to Glyphicons whenever practical.
+Glyphicons Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creators have made this possible at not cost to you as developers. As a thank you, we ask you to include an optional link back to Glyphicons whenever practical.
-All icons require an <i>
tag with a unique class, prefixed with icon-
. To use, place the following code just about anywhere:
All icons require an <i>
tag with a unique class, prefixed with icon-
. To use, place the following code just about anywhere:
<i class="icon-search"></i>-
There are also styles available for inverted (white) icons, made ready with one extra class:
+There are also styles available for inverted (white) icons, made ready with one extra class:
<i class="icon-search icon-white"></i>-
- Heads up!
- When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i>
tag for proper spacing.
-
+ Heads up!
+ When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i>
tag for proper spacing.
+
Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.
+Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.
-{{_i}}On top of the scaffolding, basic HTML elements are styled and enhanced with extensible classes to provide a fresh, consistent look and feel.{{/i}}
-{{_i}}All HTML headings, <h1>
through <h6>
are available.{{/i}}
{{_i}}All HTML headings, <h1>
through <h6>
are available.{{/i}}
{{_i}}Bootstrap's global default font-size
is 14px, with a line-height
of 20px. This is applied to the <body>
and all paragraphs. In addition, <p>
(paragraphs) receive a bottom margin of half their line-height (9px by default).{{/i}}
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.
-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.
-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.
-{{_i}}Bootstrap's global default font-size
is 14px, with a line-height
of 20px. This is applied to the <body>
and all paragraphs. In addition, <p>
(paragraphs) receive a bottom margin of half their line-height (9px by default).{{/i}}
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.
+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.
+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.
+{{_i}}Make a paragraph stand out by adding .lead
.{{/i}}
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
-{{_i}}Make a paragraph stand out by adding .lead
.{{/i}}
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
+{{_i}}The typographic scale is based on two LESS variables in variables.less: @baseFontSize
and @baseLineHeight
. 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}}
{{_i}}The typographic scale is based on two LESS variables in variables.less: @baseFontSize
and @baseLineHeight
. 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}}
{{_i}}Make use of HTML's default emphasis tags, <strong>
and <em>
.{{/i}}
{{_i}}Make use of HTML's default emphasis tags, <strong>
and <em>
.{{/i}}
<strong>
{{_i}}For emphasizing a snippet of text with important{{/i}}
-The following snippet of text is rendered as bold text.
-<strong>
{{_i}}For emphasizing a snippet of text with important{{/i}}
+The following snippet of text is rendered as bold text.
+<strong>rendered as bold text</strong>-
<em>
{{_i}}For emphasizing a snippet of text with stress{{/i}}
-The following snippet of text is rendered as italicized text.
--<em>rendered as italicized text</em> -+
<em>
{{_i}}For emphasizing a snippet of text with stress{{/i}}
+The following snippet of text is rendered as italicized text.
++ <em>rendered as italicized text</em> +-
{{_i}}Heads up!{{/i}} {{_i}}Feel free to use <b>
and <i>
in HTML5. <b>
is meant to highlight words or phrases without conveying additional importance while <i>
is mostly for voice, technical terms, etc.{{/i}}
{{_i}}Heads up!{{/i}} {{_i}}Feel free to use <b>
and <i>
in HTML5. <b>
is meant to highlight words or phrases without conveying additional importance while <i>
is mostly for voice, technical terms, etc.{{/i}}
{{_i}}Stylized implemenation of HTML's <abbr>
element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title
attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.{{/i}}
{{_i}}Stylized implemenation of HTML's <abbr>
element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title
attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.{{/i}}
<abbr>
{{_i}}For expanded text on long hover of an abbreviation, include the title
attribute.{{/i}}
{{_i}}An abbreviation of the word attribute is attr.{{/i}}
-<abbr>
{{_i}}For expanded text on long hover of an abbreviation, include the title
attribute.{{/i}}
{{_i}}An abbreviation of the word attribute is attr.{{/i}}
+<abbr title="attribute">attr</abbr>-
<abbr class="initialism">
{{_i}}Add .initialism
to an abbreviation for a slightly smaller font-size.{{/i}}
{{_i}}HTML is the best thing since sliced bread.{{/i}}
-<abbr class="initialism">
{{_i}}Add .initialism
to an abbreviation for a slightly smaller font-size.{{/i}}
{{_i}}HTML is the best thing since sliced bread.{{/i}}
+<abbr title="attribute" class="initialism">attr</abbr>-
{{_i}}Present contact information for the nearest ancestor or the entire body of work.{{/i}}
+ {{! Addresses }} +{{_i}}Present contact information for the nearest ancestor or the entire body of work.{{/i}}
-<address>
{{_i}}Preserve formatting by ending all lines with <br>
.{{/i}}
<address>
{{_i}}Preserve formatting by ending all lines with <br>
.{{/i}}
<address> <strong>Twitter, Inc.</strong><br> @@ -163,37 +154,37 @@-
{{_i}}For quoting blocks of content from another source within your document.{{/i}}
+ {{! Blockquotes }} +{{_i}}For quoting blocks of content from another source within your document.{{/i}}
-{{_i}}Wrap <blockquote>
around any HTML as the quote. For straight quotes we recommend a <p>
.{{/i}}
--Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
-
{{_i}}Wrap <blockquote>
around any HTML as the quote. For straight quotes we recommend a <p>
.{{/i}}
++Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
+
<blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> </blockquote>-
{{_i}}Style and content changes for simple variations on a standard blockquote.{{/i}}
+{{_i}}Style and content changes for simple variations on a standard blockquote.{{/i}}
-{{_i}}Add <small>
tag for identifying the source. Wrap the name of the source work in <cite>
.{{/i}}
--Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
- {{_i}}Someone famous in Source Title{{/i}} -
{{_i}}Add <small>
tag for identifying the source. Wrap the name of the source work in <cite>
.{{/i}}
++Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
+ {{_i}}Someone famous in Source Title{{/i}} +
<blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> @@ -201,14 +192,14 @@ </blockquote>-
{{_i}}Use .pull-left
and .pull-right
classes for floated, right-aligned blockquote content.{{/i}}
--Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
- {{_i}}Someone famous in Source Title{{/i}} -
{{_i}}Use .pull-left
and .pull-right
classes for floated, right-aligned blockquote content.{{/i}}
++Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
+ {{_i}}Someone famous in Source Title{{/i}} +
<blockquote class="pull-right"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> @@ -217,99 +208,99 @@-
{{_i}}A list of items in which the order does not explicitly matter.{{/i}}
-{{_i}}A list of items in which the order does not explicitly matter.{{/i}}
+<ul> <li>...</li> </ul>-
{{_i}}A list of items in which the order does explicitly matter.{{/i}}
-{{_i}}A list of items in which the order does explicitly matter.{{/i}}
+<ol> <li>...</li> </ol>-
{{_i}}A list of items with no list-style
or additional left padding.{{/i}}
{{_i}}A list of items with no list-style
or additional left padding.{{/i}}
<ul class="unstyled"> <li>...</li> </ul>-
{{_i}}A list of terms with their associated descriptions.{{/i}}
-{{_i}}A list of terms with their associated descriptions.{{/i}}
+<dl> <dt>...</dt> @@ -317,21 +308,21 @@ </dl>-
{{_i}}Make terms and descriptions in <dl>
line up side-by-side.{{/i}}
{{_i}}Make terms and descriptions in <dl>
line up side-by-side.{{/i}}
<dl class="dl-horizontal"> <dt>...</dt> @@ -339,28 +330,28 @@ </dl>
- {{_i}}Heads up!{{/i}}
- {{_i}}Horizontal description lists will truncate terms that are too long to fit in the left column fix text-overflow
. In narrower viewports, they will change to the default stacked layout.{{/i}}
-
text-overflow
. In narrower viewports, they will change to the default stacked layout.{{/i}}
+
+ Wrap inline snippets of code with <code>
.
Wrap inline snippets of code with <code>
.
{{_i}}For example, <code>section</code> should be wrapped as inline.{{/i}}-
{{_i}}Use <pre>
for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.{{/i}}
{{_i}}Use <pre>
for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.{{/i}}
<p>{{_i}}Sample text here...{{/i}}</p>@@ -369,53 +360,53 @@ <p>{{_i}}Sample text here...{{/i}}</p> </pre> -
{{_i}}Note: Be sure to keep code within <pre>
tags as close to the left as possible; it will render all tabs.{{/i}}
{{_i}}You may optionally add the .pre-scrollable
class which will set a max-height of 350px and provide a y-axis scrollbar.{{/i}}
{{_i}}Note: Be sure to keep code within <pre>
tags as close to the left as possible; it will render all tabs.{{/i}}
{{_i}}You may optionally add the .pre-scrollable
class which will set a max-height of 350px and provide a y-axis scrollbar.{{/i}}
{{_i}}For basic styling—light padding and only horizontal dividers—add the base class .table
to any <table>
.{{/i}}
# | -{{_i}}First Name{{/i}} | -{{_i}}Last Name{{/i}} | -{{_i}}Username{{/i}} | -
---|---|---|---|
1 | -Mark | -Otto | -@mdo | -
2 | -Jacob | -Thornton | -@fat | -
3 | -Larry | -the Bird | -
{{_i}}For basic styling—light padding and only horizontal dividers—add the base class .table
to any <table>
.{{/i}}
# | +{{_i}}First Name{{/i}} | +{{_i}}Last Name{{/i}} | +{{_i}}Username{{/i}} | +
---|---|---|---|
1 | +Mark | +Otto | +@mdo | +
2 | +Jacob | +Thornton | +@fat | +
3 | +Larry | +the Bird | +
<table class="table"> … @@ -423,168 +414,168 @@-
{{_i}}Add any of the follow classes to the .table
base class.{{/i}}
{{_i}}Add any of the follow classes to the .table
base class.{{/i}}
{{_i}}.table-striped{{/i}}
{{_i}}Adds zebra-striping to any table row within the <tbody>
via the :nth-child
CSS selector (not available in IE7-IE8).{{/i}}
# | -{{_i}}First Name{{/i}} | -{{_i}}Last Name{{/i}} | -{{_i}}Username{{/i}} | -
---|---|---|---|
1 | -Mark | -Otto | -@mdo | -
2 | -Jacob | -Thornton | -@fat | -
3 | -Larry | -the Bird | -
{{_i}}.table-striped{{/i}}
{{_i}}Adds zebra-striping to any table row within the <tbody>
via the :nth-child
CSS selector (not available in IE7-IE8).{{/i}}
# | +{{_i}}First Name{{/i}} | +{{_i}}Last Name{{/i}} | +{{_i}}Username{{/i}} | +
---|---|---|---|
1 | +Mark | +Otto | +@mdo | +
2 | +Jacob | +Thornton | +@fat | +
3 | +Larry | +the Bird | +
<table class="table table-striped"> … </table>-
{{_i}}.table-bordered{{/i}}
{{_i}}Add borders and rounded corners to the table.{{/i}}
-# | -{{_i}}First Name{{/i}} | -{{_i}}Last Name{{/i}} | -{{_i}}Username{{/i}} | -
---|---|---|---|
1 | -Mark | -Otto | -@mdo | -
Mark | -Otto | -@TwBootstrap | -|
2 | -Jacob | -Thornton | -@fat | -
3 | -Larry the Bird | -
{{_i}}.table-bordered{{/i}}
{{_i}}Add borders and rounded corners to the table.{{/i}}
+# | +{{_i}}First Name{{/i}} | +{{_i}}Last Name{{/i}} | +{{_i}}Username{{/i}} | +
---|---|---|---|
1 | +Mark | +Otto | +@mdo | +
Mark | +Otto | +@TwBootstrap | +|
2 | +Jacob | +Thornton | +@fat | +
3 | +Larry the Bird | +
<table class="table table-bordered"> … </table>-
{{_i}}.table-hover{{/i}}
{{_i}}Enable a hover state on table rows within a <tbody>
.{{/i}}
# | -{{_i}}First Name{{/i}} | -{{_i}}Last Name{{/i}} | -{{_i}}Username{{/i}} | -
---|---|---|---|
1 | -Mark | -Otto | -@mdo | -
2 | -Jacob | -Thornton | -@fat | -
3 | -Larry the Bird | -
{{_i}}.table-hover{{/i}}
{{_i}}Enable a hover state on table rows within a <tbody>
.{{/i}}
# | +{{_i}}First Name{{/i}} | +{{_i}}Last Name{{/i}} | +{{_i}}Username{{/i}} | +
---|---|---|---|
1 | +Mark | +Otto | +@mdo | +
2 | +Jacob | +Thornton | +@fat | +
3 | +Larry the Bird | +
<table class="table table-hover"> … </table>-
{{_i}}.table-condensed{{/i}}
{{_i}}Makes tables more compact by cutting cell padding in half.{{/i}}
-# | -{{_i}}First Name{{/i}} | -{{_i}}Last Name{{/i}} | -{{_i}}Username{{/i}} | -
---|---|---|---|
1 | -Mark | -Otto | -@mdo | -
2 | -Jacob | -Thornton | -@fat | -
3 | -Larry the Bird | -
{{_i}}.table-condensed{{/i}}
{{_i}}Makes tables more compact by cutting cell padding in half.{{/i}}
+# | +{{_i}}First Name{{/i}} | +{{_i}}Last Name{{/i}} | +{{_i}}Username{{/i}} | +
---|---|---|---|
1 | +Mark | +Otto | +@mdo | +
2 | +Jacob | +Thornton | +@fat | +
3 | +Larry the Bird | +
<table class="table table-condensed"> … @@ -592,82 +583,82 @@-
{{_i}}List of supported table HTML elements and how they should be used.{{/i}}
-{{_i}}Tag{{/i}} | -{{_i}}Description{{/i}} | -
---|---|
- <table>
- |
- - {{_i}}Wrapping element for displaying data in a tabular format{{/i}} - | -
- <thead>
- |
-
- {{_i}}Container element for table header rows (<tr> ) to label table columns{{/i}}
- |
-
- <tbody>
- |
-
- {{_i}}Container element for table rows (<tr> ) in the body of the table{{/i}}
- |
-
- <tr>
- |
-
- {{_i}}Container element for a set of table cells (<td> or <th> ) that appears on a single row{{/i}}
- |
-
- <td>
- |
- - {{_i}}Default table cell{{/i}} - | -
- <th>
- |
-
- {{_i}}Special table cell for column (or row, depending on scope and placement) labels{{/i}} - {{_i}}Must be used within a <thead> {{/i}}
- |
-
- <caption>
- |
- - {{_i}}Description or summary of what the table holds, especially useful for screen readers{{/i}} - | -
{{_i}}List of supported table HTML elements and how they should be used.{{/i}}
+{{_i}}Tag{{/i}} | +{{_i}}Description{{/i}} | +
---|---|
+ <table>
+ |
+ + {{_i}}Wrapping element for displaying data in a tabular format{{/i}} + | +
+ <thead>
+ |
+
+ {{_i}}Container element for table header rows (<tr> ) to label table columns{{/i}}
+ |
+
+ <tbody>
+ |
+
+ {{_i}}Container element for table rows (<tr> ) in the body of the table{{/i}}
+ |
+
+ <tr>
+ |
+
+ {{_i}}Container element for a set of table cells (<td> or <th> ) that appears on a single row{{/i}}
+ |
+
+ <td>
+ |
+ + {{_i}}Default table cell{{/i}} + | +
+ <th>
+ |
+
+ {{_i}}Special table cell for column (or row, depending on scope and placement) labels{{/i}} + {{_i}}Must be used within a <thead> {{/i}}
+ |
+
+ <caption>
+ |
+ + {{_i}}Description or summary of what the table holds, especially useful for screen readers{{/i}} + | +
<table> <thead> @@ -685,28 +676,28 @@ </table>-
{{_i}}Individual form controls receive styling, but without any required base class on the <form>
or large changes in markup. Results in stacked, left-aligned labels on top of form controls.{{/i}}
{{_i}}Example block-level help text here.{{/i}}
- - -{{_i}}Individual form controls receive styling, but without any required base class on the <form>
or large changes in markup. Results in stacked, left-aligned labels on top of form controls.{{/i}}
{{_i}}Example block-level help text here.{{/i}}
+ + +<form class="well"> <label>{{_i}}Label name{{/i}}</label> @@ -720,18 +711,18 @@-
{{_i}}Included with Bootstrap are three optional form layouts for common use cases.{{/i}}
+{{_i}}Included with Bootstrap are three optional form layouts for common use cases.{{/i}}
-{{_i}}Add .form-search
to the form and .search-query
to the <input>
for an extra-rounded text input.{{/i}}
{{_i}}Add .form-search
to the form and .search-query
to the <input>
for an extra-rounded text input.{{/i}}
<form class="form-search"> <input type="text" class="input-medium search-query"> @@ -739,16 +730,16 @@ </form>-
{{_i}}Add .form-inline
for left-aligned labels and inline-block controls for a compact layout.{{/i}}
{{_i}}Add .form-inline
for left-aligned labels and inline-block controls for a compact layout.{{/i}}
<form class="form-inline"> <input type="text" class="input-small" placeholder="{{_i}}Email{{/i}}"> @@ -760,36 +751,36 @@ </form>-
{{_i}}Right align labels and float them to the left to make them appear on the same line as controls. Requires the most markup changes from a default form:{{/i}}
-.form-horizontal
to the form{{/i}}.control-group
{{/i}}.control-label
to the label{{/i}}.controls
for proper alignment{{/i}}{{_i}}Right align labels and float them to the left to make them appear on the same line as controls. Requires the most markup changes from a default form:{{/i}}
+.form-horizontal
to the form{{/i}}.control-group
{{/i}}.control-label
to the label{{/i}}.controls
for proper alignment{{/i}}<form class="form-horizontal"> <div class="control-group"> @@ -816,49 +807,49 @@-
{{_i}}Examples of standard form controls supported in an example form layout.{{/i}}
+{{_i}}Examples of standard form controls supported in an example form layout.{{/i}}
-{{_i}}Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.{{/i}}
-{{_i}}Requires the use of a specified type
at all times.{{/i}}
{{_i}}Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.{{/i}}
+{{_i}}Requires the use of a specified type
at all times.{{/i}}
<input type="text" placeholder="Text input">-
{{_i}}Form control which supports multiple lines of text. Change row
attribute as necessary.{{/i}}
{{_i}}Form control which supports multiple lines of text. Change row
attribute as necessary.{{/i}}
<textarea id="textarea" rows="3"></textarea>-
{{_i}}Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.{{/i}}
-{{_i}}Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.{{/i}}
+<label class="checkbox"> <input type="checkbox" value=""> @@ -875,19 +866,19 @@ </label>-
{{_i}}Add the .inline
class to a series of checkboxes or radios for controls appear on the same line.{{/i}}
{{_i}}Add the .inline
class to a series of checkboxes or radios for controls appear on the same line.{{/i}}
<label class="checkbox inline"> <input type="checkbox" id="inlineCheckbox1" value="option1"> 1 @@ -900,25 +891,25 @@ </label>-
{{_i}}Use the default option or specify a multiple="multiple"
to show multiple options at once.{{/i}}
{{_i}}Use the default option or specify a multiple="multiple"
to show multiple options at once.{{/i}}
<select> <option>something</option> @@ -938,28 +929,28 @@-
{{_i}}Adding on top of existing browser controls, Bootstrap includes other useful form components.{{/i}}
+{{_i}}Adding on top of existing browser controls, Bootstrap includes other useful form components.{{/i}}
-{{_i}}Add text or buttons before or after any text-based input. Do note that select
elements are not supported here.{{/i}}
{{_i}}Add text or buttons before or after any text-based input. Do note that select
elements are not supported here.{{/i}}
{{_i}}Wrap a .add-on
and an input
with one of two classes to prepend or append text to an input.{{/i}}
{{_i}}Wrap a .add-on
and an input
with one of two classes to prepend or append text to an input.{{/i}}
<div class="input-prepend"> <span class="add-on">@</span><input class="span2" id="prependedInput" size="16" type="text" placeholder="{{_i}}Username{{/i}}"> @@ -969,35 +960,35 @@ </div>-
{{_i}}Use both classes and two instances of .add-on
to prepend and append an input.{{/i}}
{{_i}}Use both classes and two instances of .add-on
to prepend and append an input.{{/i}}
<div class="input-prepend input-append"> <span class="add-on">$</span><input class="span2" id="appendedPrependedInput" size="16" type="text"><span class="add-on">.00</span> </div>-
{{_i}}Instead of a <span>
with text, use a .btn
to attach a button (or two) to an input.{{/i}}
{{_i}}Instead of a <span>
with text, use a .btn
to attach a button (or two) to an input.{{/i}}
<div class="input-append"> <input class="span2" id="appendedInputButton" size="16" type="text"><button class="btn" type="button">Go!</button> @@ -1008,20 +999,20 @@ </div>-
{{_i}}Use relative sizing classes like .input-large
or match your inputs to the grid column sizes using .span*
classes.{{/i}}
{{_i}}Use relative sizing classes like .input-large
or match your inputs to the grid column sizes using .span*
classes.{{/i}}
<input class="input-mini" type="text"> <input class="input-small" type="text"> @@ -1030,68 +1021,68 @@ <input class="input-xlarge" type="text"> <input class="input-xxlarge" type="text">-
- {{_i}}Heads up!{{/i}} In future versions, we'll be altering the use of these relative input classes to match our button sizes. For example, .input-large
will increase the padding and font-size of an input.
-
+ {{_i}}Heads up!{{/i}} In future versions, we'll be altering the use of these relative input classes to match our button sizes. For example, .input-large
will increase the padding and font-size of an input.
+
{{_i}}Use .span1
to .span12
for inputs that match the same sizes of the grid columns.{{/i}}
{{_i}}Use .span1
to .span12
for inputs that match the same sizes of the grid columns.{{/i}}
<input class="span1" type="text"> <input class="span2" type="text"> <input class="span3" type="text">-
{{_i}}For multiple grid inputs per line, use the .controls-row
modifier class for proper spacing. It floats the inputs to collapse white-space, sets the proper margins, and the clears the float.{{/i}}
{{_i}}For multiple grid inputs per line, use the .controls-row
modifier class for proper spacing. It floats the inputs to collapse white-space, sets the proper margins, and the clears the float.{{/i}}
<div class="controls controls-row"> <input class="span4" type="text" placeholder=".span4"> @@ -1099,23 +1090,23 @@ </div>-
{{_i}}Present data in a form that's not editable without using actual form markup.{{/i}}
-{{_i}}Present data in a form that's not editable without using actual form markup.{{/i}}
+<span class="input-xlarge uneditable-input">Some value here</span>-
{{_i}}End a form with a group of actions (buttons). When placed within a .form-horizontal
, the buttons will automatically indent to line up with the form controls.{{/i}}
{{_i}}End a form with a group of actions (buttons). When placed within a .form-horizontal
, the buttons will automatically indent to line up with the form controls.{{/i}}
<div class="form-actions"> <button type="submit" class="btn btn-primary">{{_i}}Save changes{{/i}}</button> @@ -1123,76 +1114,76 @@ </div>-
{{_i}}Inline and block level support for help text that appears around form controls.{{/i}}
-{{_i}}Inline and block level support for help text that appears around form controls.{{/i}}
+<span class="help-inline">Inline help text</span>-
<span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>-
{{_i}}Provide feedback to users or visitors with basic feedback states on form controls and labels.{{/i}}
+{{_i}}Provide feedback to users or visitors with basic feedback states on form controls and labels.{{/i}}
-{{_i}}We remove the default outline
styles on some form controls and apply a box-shadow
in its place for :focus
.{{/i}}
{{_i}}We remove the default outline
styles on some form controls and apply a box-shadow
in its place for :focus
.{{/i}}
<input class="input-xlarge" id="focusedInput" type="text" value="{{_i}}This is focused...{{/i}}">-
{{_i}}Add the disabled
attribute on an input to prevent user input and trigger a slightly different look.{{/i}}
{{_i}}Add the disabled
attribute on an input to prevent user input and trigger a slightly different look.{{/i}}
<input class="input-xlarge" id="disabledInput" type="text" placeholder="{{_i}}Disabled input here...{{/i}}" disabled>-
{{_i}}Bootstrap includes validation styles for error, warning, and success messages. To use, add the appropriate class to the surrounding .control-group
.{{/i}}
{{_i}}Bootstrap includes validation styles for error, warning, and success messages. To use, add the appropriate class to the surrounding .control-group
.{{/i}}
<div class="control-group warning"> <label class="control-label" for="inputWarning">{{_i}}Input with warning{{/i}}</label> @@ -1217,133 +1208,133 @@ </div>-
{{_i}}Button styles can be applied to anything with the .btn
class applied. However, typically you'll want to apply these to only <a>
and <button>
elements for the best rendering.{{/i}}
{{_i}}Button{{/i}} | -{{_i}}class=""{{/i}} | -{{_i}}Description{{/i}} | -
---|---|---|
- | btn |
- {{_i}}Standard gray button with gradient{{/i}} | -
- | btn btn-primary |
- {{_i}}Provides extra visual weight and identifies the primary action in a set of buttons{{/i}} | -
- | btn btn-info |
- {{_i}}Used as an alternative to the default styles{{/i}} | -
- | btn btn-success |
- {{_i}}Indicates a successful or positive action{{/i}} | -
- | btn btn-warning |
- {{_i}}Indicates caution should be taken with this action{{/i}} | -
- | btn btn-danger |
- {{_i}}Indicates a dangerous or potentially negative action{{/i}} | -
- | btn btn-inverse |
- {{_i}}Alternate dark gray button, not tied to a semantic action or use{{/i}} | -
{{_i}}Button styles can be applied to anything with the .btn
class applied. However, typically you'll want to apply these to only <a>
and <button>
elements for the best rendering.{{/i}}
{{_i}}Button{{/i}} | +{{_i}}class=""{{/i}} | +{{_i}}Description{{/i}} | +
---|---|---|
+ | btn |
+ {{_i}}Standard gray button with gradient{{/i}} | +
+ | btn btn-primary |
+ {{_i}}Provides extra visual weight and identifies the primary action in a set of buttons{{/i}} | +
+ | btn btn-info |
+ {{_i}}Used as an alternative to the default styles{{/i}} | +
+ | btn btn-success |
+ {{_i}}Indicates a successful or positive action{{/i}} | +
+ | btn btn-warning |
+ {{_i}}Indicates caution should be taken with this action{{/i}} | +
+ | btn btn-danger |
+ {{_i}}Indicates a dangerous or potentially negative action{{/i}} | +
+ | btn btn-inverse |
+ {{_i}}Alternate dark gray button, not tied to a semantic action or use{{/i}} | +
{{_i}}IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button
elements, rendering text gray with a nasty text-shadow that we cannot fix.{{/i}}
{{_i}}IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button
elements, rendering text gray with a nasty text-shadow that we cannot fix.{{/i}}
{{_i}}Fancy larger or smaller buttons? Add .btn-large
, .btn-small
, or .btn-mini
for two additional sizes.{{/i}}
- - -
-- - -
-- - -
+{{_i}}Fancy larger or smaller buttons? Add .btn-large
, .btn-small
, or .btn-mini
for two additional sizes.{{/i}}
+ + +
++ + +
++ + +
-{{_i}}Make buttons look unclickable by fading them back 50%.{{/i}}
+{{_i}}Make buttons look unclickable by fading them back 50%.{{/i}}
-{{_i}}Add the .disabled
class to <a>
buttons.{{/i}}
- {{_i}}Primary link{{/i}} - {{_i}}Link{{/i}} -
+{{_i}}Add the .disabled
class to <a>
buttons.{{/i}}
+ {{_i}}Primary link{{/i}} + {{_i}}Link{{/i}} +
<a href="#" class="btn btn-large btn-primary disabled">{{_i}}Primary link{{/i}}</a> <a href="#" class="btn btn-large disabled">{{_i}}Link{{/i}}</a>-
- {{_i}}Heads up!{{/i}}
- {{_i}}We use .disabled
as a utility class here, similar to the common .active
class, so no prefix is required.{{/i}}
-
+ {{_i}}Heads up!{{/i}}
+ {{_i}}We use .disabled
as a utility class here, similar to the common .active
class, so no prefix is required.{{/i}}
+
{{_i}}Add the disabled
attribute to <button>
buttons.{{/i}}
- - -
+{{_i}}Add the disabled
attribute to <button>
buttons.{{/i}}
+ + +
<button type="button" class="btn btn-large btn-primary disabled" disabled="disabled">{{_i}}Primary button{{/i}}</button> <button type="button" class="btn btn-large" disabled>{{_i}}Button{{/i}}</button>-
{{_i}}Use the .btn
class on an <a>
, <button>
, or <input>
element.{{/i}}
{{_i}}Use the .btn
class on an <a>
, <button>
, or <input>
element.{{/i}}
<a class="btn" href="">{{_i}}Link{{/i}}</a> <button class="btn" type="submit"> @@ -1354,244 +1345,246 @@ <input class="btn" type="submit" value="{{_i}}Submit{{/i}}">-
{{_i}}As a best practice, try to match the element for you context to ensure matching cross-browser rendering. If you have an input
, use an <input type="submit">
for your button.{{/i}}
{{_i}}As a best practice, try to match the element for you context to ensure matching cross-browser rendering. If you have an input
, use an <input type="submit">
for your button.{{/i}}
{{_i}}140 icons in sprite form, available in dark gray (default) and white, provided by Glyphicons.{{/i}}
-{{_i}}140 icons in sprite form, available in dark gray (default) and white, provided by Glyphicons.{{/i}}
+{{_i}}Glyphicons Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creators have made this possible at not cost to you as developers. As a thank you, we ask you to include an optional link back to Glyphicons whenever practical.{{/i}}
+{{_i}}Glyphicons Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creators have made this possible at not cost to you as developers. As a thank you, we ask you to include an optional link back to Glyphicons whenever practical.{{/i}}
-{{_i}}All icons require an <i>
tag with a unique class, prefixed with icon-
. To use, place the following code just about anywhere:{{/i}}
{{_i}}All icons require an <i>
tag with a unique class, prefixed with icon-
. To use, place the following code just about anywhere:{{/i}}
<i class="icon-search"></i>-
{{_i}}There are also styles available for inverted (white) icons, made ready with one extra class:{{/i}}
+{{_i}}There are also styles available for inverted (white) icons, made ready with one extra class:{{/i}}
<i class="icon-search icon-white"></i>-
- {{_i}}Heads up!{{/i}}
- {{_i}}When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i>
tag for proper spacing.{{/i}}
-
+ {{_i}}Heads up!{{/i}}
+ {{_i}}When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i>
tag for proper spacing.{{/i}}
+
{{_i}}Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.{{/i}}
+{{_i}}Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.{{/i}}
-