Forms
Basic
This is a basic form composed of the <form>
tag containing various <label>
, <input>
, <select>
and <textarea>
fields.
Each label and input pair are wrapped in a .form-item
class that adds bottom margin and keeps our respective labels and inputs in their own block so no content wraps around them.
You can change the $placeholder-color
variable in the /helpers/_variables.scss
file to adjust the placeholder text color.
Styled
A styled form can be created by using the .form
class. We have isolated custom form styles into their own class because many JavaScript plugins use forms, and we wanted to avoid styling conflicts.
Fieldset
Wrapping your form content with a <fieldset>
tag allows you to group related elements inside of your form. Adding the <legend>
tag allows you to denote each section with a small heading.
Inline
Adding the class .form-inline
to your <form>
element allows you to display your form elements in an inline fashion. By default, the .form-inline
class will give each <label>
element a width of 100px.