How to align the dropdown menu with the text?

3

I'm having difficulty aligning my menu dropdown , the whole form and even the text that should accompany the dropdown menu is right. Any tips?

Eg: Result obtained: | dropdown | Choose an ingredient:

Expected result : Choose an ingredient: | dropdown |

Code of my menu dropdown

<div class="form-group">Ingredientes:
<SELECT NAME="ingredientes"  class="col-md-4 control-label" required="1">
            <option Selecione...</option>
            <?php
            while($dados3 = mysql_fetch_array($q3))
            {   
            ?>
             <option value="<?=$dados3['id_ingredientes'] ?>">
            <?=$dados3['nome'] ?>
            </option>
            <?php
                }
            ?>

    </SELECT>
</div>

Print from the menu:

  

    
asked by anonymous 28.05.2017 / 23:52

1 answer

3

If I understood correctly, try this:

<div class="form-horizontal">
    <div class="form-group">
        <label for="ingredientes" class="col-sm-2 control-label">Escolha um ingrediente</label>
        <select name="ingredientes" id="ingredientes" class="col-md-4 control-label" required="1">
            <option>Selecione</option>
            <?php
            while($dados3 = mysql_fetch_array($q3)) {   
            ?>
            <option value="<?= $dados3['id_ingredientes'] ?>">
                <?= $dados3['nome'] ?>
            </option>
            <?php
            }
            ?>
        </select>
    </div>
</div>

Always check the Bootstrap documentation, you can help link

    
29.05.2017 / 00:25