What is the difference between form-group and input-group bootstrap?

0

What's the difference? in which cases are they used one or the other?

    
asked by anonymous 16.08.2014 / 19:21

1 answer

1

form-group is used in a div that will contain the objects of a form, it will be an 'Input group', so we can for example group a label with an input like this:

<div class="form-group">
    <label for="nome">Nome</label>
    <input type="text" id="nome" name="nome" class="form-control" />
</div> 

Since input-group is for joining two independent objects together and forming one, it is like having a text box attached to a label giving the impression that it is a single object.

<div class="input-group">
    <div class="input-group-addon">@</div>
    <input class="form-control" type="email" placeholder="Entre com o email">
</div>
    
18.08.2014 / 15:55