Div Class Form Group

Wrap labels and controls in a div with class form group.
Div class form group. Examples and usage guidelines for form control styles layout options and custom components for creating a wide variety of forms. Put form controls label and input tags inside the form group class. Add the relative form sizing classes to the input group itself and contents within will automatically resize no need for repeating the form control size classes on each element. The rest of class are same as the default form classes.
Wrap labels and form controls in div class form group needed for optimum spacing add class form control to all textual input textarea and select elements bootstrap vertical form default. The b form group component is the easiest way to add some structure to forms. Sizing on the individual input group elements isn t supported. Add control label class to the label and put input text inside the column grid div tag.
If you want to use margin or padding utilities to build that perfect alignment you want. Its purpose is to pair form controls with a legend or label and to provide help text and invalid valid feedback text as well as visual color contextual state feedback. Use input group prepend to add the help text in front of the input and input group append to add it behind the input. Check out the below form to understand the horizontal form layout.
At last add the input group text class to style the specified help text. Remember to add col form label to your label s as well so they re vertically centered with their associated form controls. This is needed for optimum spacing. Easily extend form controls by adding text buttons or button groups on either side of textual inputs custom selects and custom file inputs.