<p>The best part about forms in Bootstrap is that all your inputs and controls look great no matter how you build them in your markup. No superfluous HTML is required, but we provide the patterns for those who require it.</p>
<p>{{_i}}The best part about forms in Bootstrap is that all your inputs and controls look great no matter how you build them in your markup. No superfluous HTML is required, but we provide the patterns for those who require it.{{/i}}</p>
<p>More complicated layouts come with succinct and scalable classes for easy styling and event binding, so you're covered at every step.</p>
<p>{{_i}}More complicated layouts come with succinct and scalable classes for easy styling and event binding, so you're covered at every step.{{/i}}</p>
</div>
</div>
<divclass="span4">
<divclass="span4">
<h2>Four layouts included</h2>
<h2>{{_i}}Four layouts included{{/i}}</h2>
<p>Bootstrap comes with support for four types of form layouts:</p>
<p>{{_i}}Bootstrap comes with support for four types of form layouts:{{/i}}</p>
<ul>
<ul>
<li>Vertical (default)</li>
<li>{{_i}}Vertical (default){{/i}}</li>
<li>Search</li>
<li>{{_i}}Search{{/i}}</li>
<li>Inline</li>
<li>{{_i}}Inline{{/i}}</li>
<li>Horizontal</li>
<li>{{_i}}Horizontal{{/i}}</li>
</ul>
</ul>
<p>Different types of form layouts require some changes to markup, but the controls themselves remain and behave the same.</p>
<p>{{_i}}Different types of form layouts require some changes to markup, but the controls themselves remain and behave the same.{{/i}}</p>
</div>
</div>
<divclass="span4">
<divclass="span4">
<h2>Control states and more</h2>
<h2>{{_i}}Control states and more{{/i}}</h2>
<p>Bootstrap's forms include styles for all the base form controls like input, textarea, and select you'd expect. But it also comes with a number of custom components like appended and prepended inputs and support for lists of checkboxes.</p>
<p>{{_i}}Bootstrap's forms include styles for all the base form controls like input, textarea, and select you'd expect. But it also comes with a number of custom components like appended and prepended inputs and support for lists of checkboxes.{{/i}}</p>
<p>States like error, warning, and success are included for each type of form control. Also included are styles for disabled controls.</p>
<p>{{_i}}States like error, warning, and success are included for each type of form control. Also included are styles for disabled controls.{{/i}}</p>
</div>
</div>
</div>
</div>
<h2>Four types of forms</h2>
<h2>{{_i}}Four types of forms{{/i}}</h2>
<p>Bootstrap provides simple markup and styles for four styles of common web forms.</p>
<p>{{_i}}Bootstrap provides simple markup and styles for four styles of common web forms.{{/i}}</p>
<p>Up to v1.4, Bootstrap's default form styles used the horizontal layout. With Bootstrap 2, we removed that constraint to have smarter, more scalable defaults for any form.</p>
<p>{{_i}}Up to v1.4, Bootstrap's default form styles used the horizontal layout. With Bootstrap 2, we removed that constraint to have smarter, more scalable defaults for any form.{{/i}}</p>
<p>Bootstrap features styles for browser-supported focused and <code>disabled</code> states. We remove the default Webkit <code>outline</code> and apply a <code>box-shadow</code> in it's place for <code>:focus</code>.</p>
<p>{{_i}}Bootstrap features styles for browser-supported focused and <code>disabled</code> states. We remove the default Webkit <code>outline</code> and apply a <code>box-shadow</code> in it's place for <code>:focus</code>.{{/i}}</p>
<hr>
<hr>
<h3>Form validation</h3>
<h3>{{_i}}Form validation{{/i}}</h3>
<p>It also includes validation styles for errors, warnings, and success. To use, add the a class to the surrounding <code>.control-group</code>.</p>
<p>{{_i}}It also includes validation styles for errors, warnings, and success. To use, add the a class to the surrounding <code>.control-group</code>.{{/i}}</p>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<fieldset
<fieldset
class="control-group error">
class="control-group error">
...
…
</fieldset>
</fieldset>
</pre>
</pre>
</div>
</div>
...
@@ -1064,38 +1064,38 @@
...
@@ -1064,38 +1064,38 @@
<divclass="row">
<divclass="row">
<divclass="span8">
<divclass="span8">
<formclass="form-horizontal">
<formclass="form-horizontal">
<legend>Extending form controls</legend>
<legend>{{_i}}Extending form controls{{/i}}</legend>
<p>Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.</p>
<p>{{_i}}Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.{{/i}}</p>
<hr>
<hr>
<h3>Checkboxes and radios</h3>
<h3>{{_i}}Checkboxes and radios{{/i}}</h3>
<p>Up to v1.4, Bootstrap required extra markup around checkboxes and radios to stack them. Now, it's a simple matter of repeating the <code><label class="checkbox"></code> that wraps the <code><input type="checkbox"></code>.</p>
<p>{{_i}}Up to v1.4, Bootstrap required extra markup around checkboxes and radios to stack them. Now, it's a simple matter of repeating the <code><label class="checkbox"></code> that wraps the <code><input type="checkbox"></code>.{{/i}}</p>
<p>Inline checkboxes and radios are also supported. Just add <code>.inline</code> to any <code>.checkbox</code> or <code>.radio</code> and you're done.</p>
<p>{{_i}}Inline checkboxes and radios are also supported. Just add <code>.inline</code> to any <code>.checkbox</code> or <code>.radio</code> and you're done.{{/i}}</p>
<td>Indicates a dangerous or potentially negative action</td>
<td>{{_i}}Indicates a dangerous or potentially negative action{{/i}}</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<divclass="row">
<divclass="row">
<divclass="span4">
<divclass="span4">
<h3>Buttons for actions</h3>
<h3>{{_i}}Buttons for actions{{/i}}</h3>
<p>As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.</p>
<p>{{_i}}As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.{{/i}}</p>
</div>
</div>
<divclass="span4">
<divclass="span4">
<h3>For anchors and forms</h3>
<h3>{{_i}}For anchors and forms{{/i}}</h3>
<p>Button styles can be applied to anything with the <code>.btn</code> applied. However, typically you’ll want to apply these to only <code><a></code> and <code><button></code> elements.</p>
<p>{{_i}}Button styles can be applied to anything with the <code>.btn</code> applied. However, typically you’ll want to apply these to only <code><a></code> and <code><button></code> elements.{{/i}}</p>
</div>
</div>
<divclass="span4">
<divclass="span4">
<p><strong>Note:</strong> All buttons must include the <code>.btn</code> class. Button styles should be applied to <code><button></code> and <code><a></code> elements for consistency.</p>
<p>{{_i}}<strong>Note:</strong> All buttons must include the <code>.btn</code> class. Button styles should be applied to <code><button></code> and <code><a></code> elements for consistency.{{/i}}</p>
</div>
</div>
</div>
</div>
<divclass="row">
<divclass="row">
<divclass="span4">
<divclass="span4">
<h3>Multiple sizes</h3>
<h3>{{_i}}Multiple sizes{{/i}}</h3>
<p>Fancy larger or smaller buttons? Have at it!</p>
<p>{{_i}}Fancy larger or smaller buttons? Have at it!{{/i}}</p>
<p>
<p>
<ahref="#"class="btn large primary">Primary action</a>
<ahref="#"class="btn large primary">{{_i}}Primary action{{/i}}</a>
<p>For buttons that are not active or are disabled by the app for one reason or another, use the disabled state. That’s <code>.disabled</code> for links and <code>:disabled</code> for <code><button></code> elements.</p>
<p>{{_i}}For buttons that are not active or are disabled by the app for one reason or another, use the disabled state. That’s <code>.disabled</code> for links and <code>:disabled</code> for <code><button></code> elements.{{/i}}</p>
<p>
<p>
<ahref="#"class="btn large primary disabled">Primary action</a>
<ahref="#"class="btn large primary disabled">{{_i}}Primary action{{/i}}</a>
<ahref="#"class="btn large disabled">Action</a>
<ahref="#"class="btn large disabled">{{_i}}Action{{/i}}</a>
</p>
</p>
<p>
<p>
<buttonclass="btn large primary disabled"disabled="disabled">Primary action</button> <buttonclass="btn large"disabled>Action</button>
<buttonclass="btn large primary disabled"disabled="disabled">{{_i}}Primary action{{/i}}</button>
<h1>Icons <small>Graciously provided by <ahref="http://glyphicons.com"target="_blank">Glyphicons</a></small></h1>
<h1>{{_i}}Icons <small>Graciously provided by <ahref="http://glyphicons.com"target="_blank">Glyphicons</a></small>{{/i}}</h1>
</div>
</div>
<divclass="row">
<divclass="row">
<divclass="span2">
<divclass="span2">
...
@@ -1365,7 +1366,7 @@
...
@@ -1365,7 +1366,7 @@
</div>
</div>
</div>
</div>
<divclass="span2">
<divclass="span2">
<pclass="muted">Light red background color is only used to show the dimensions of the icons in the docs.</p>
<pclass="muted">{{_i}}Light red background color is only used to show the dimensions of the icons in the docs.{{/i}}</p>
</div>
</div>
</div>
</div>
...
@@ -1373,38 +1374,38 @@
...
@@ -1373,38 +1374,38 @@
<divclass="row">
<divclass="row">
<divclass="span4">
<divclass="span4">
<h3>Built as a sprite</h3>
<h3>{{_i}}Built as a sprite{{/i}}</h3>
<p>Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with <code>background-position</code>. This is the same method we use on Twitter.com and it has worked well for us.</p>
<p>{{_i}}Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with <code>background-position</code>. This is the same method we use on Twitter.com and it has worked well for us.{{/i}}</p>
<p><ahref="http://glyphicons.com"target="_blank">Glyphicons</a> has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit. Please consider doing the same in your projects.</p>
<p>{{_i}}<ahref="http://glyphicons.com"target="_blank">Glyphicons</a> has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit. Please consider doing the same in your projects.{{/i}}</p>
</div>
</div>
<divclass="span4">
<divclass="span4">
<h3>How to use</h3>
<h3>{{_i}}How to use{{/i}}</h3>
<p>With v2.0.0, the <code><i></code> tag is essentially dedicated to iconography. To use the icons, you can place the follow code wherever you like one to appear:</p>
<p>{{_i}}With v2.0.0, the <code><i></code> tag is essentially dedicated to iconography. To use the icons, you can place the follow code wherever you like one to appear:{{/i}}</p>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
<i class="chevron-left"></i>
<i class="chevron-left"></i>
</pre>
</pre>
<p>There are over 100 classes to choose from for your icons. Just add an <code><i></code> tag with the right class and you're set. You can find the full list in sprites.less or right here in this document.</p>
<p>{{_i}}There are over 100 classes to choose from for your icons. Just add an <code><i></code> tag with the right class and you're set. You can find the full list in sprites.less or right here in this document.{{/i}}</p>
</div>
</div>
<divclass="span4">
<divclass="span4">
<h3>Use cases</h3>
<h3>{{_i}}Use cases{{/i}}</h3>
<p>Icons are great, but where would one use them? Here are a few ideas:</p>
<p>{{_i}}Icons are great, but where would one use them? Here are a few ideas:{{/i}}</p>
<ul>
<ul>
<li>As visuals for your sidebar navigation</li>
<li>{{_i}}As visuals for your sidebar navigation{{/i}}</li>
<li>For a purely icon-driven nav</li>
<li>{{_i}}For a purely icon-driven nav{{/i}}</li>
<li>For buttons to help convey the meaning of an action</li>
<li>{{_i}}For buttons to help convey the meaning of an action{{/i}}</li>
<li>With links to share context on a user's destination</li>
<li>{{_i}}With links to share context on a user's destination{{/i}}</li>
</ul>
</ul>
<p>Essentially, anywhere you can put an <code><i></code> tag, you can put an icon.</p>
<p>{{_i}}Essentially, anywhere you can put an <code><i></code> tag, you can put an icon.{{/i}}</p>
</div>
</div>
</div>
</div>
<h3>Examples</h3>
<h3>{{_i}}Examples{{/i}}</h3>
<divclass="row">
<divclass="row">
<divclass="span4">
<divclass="span4">
<p>Use them in buttons, or in button groups for a toolbar style presentation.</p>
<p>{{_i}}Use them in buttons, or in button groups for a toolbar style presentation.{{/i}}</p>