<input>
, <textarea>
, and <select>
elements with .form-control
are set to width 100% by default. Wrap labels and controls in .form-group
for optimum spacing. .form-horizontal
class to <form>
tag ).form-inline
class to <form>
tag )<form>
tag attribute role="form"
eg: <form role="form">
.form-group
for proper spacing between form elements. eg: <div class="form-group">
.form-inline
to form (which doesn't have to be a <form>
) such that it is left-aligned and inline-block controls.
.form-horizontal
to the form (which doesn't have to be a <form>
). .has-warning
.has-error
.has-success