How to put the selected label on the left in bootstrap

advertisements

I have this problem:

And this is my code:

<form class="form-horizontal">
    <div class="row">
        <div class="col-sm-2">
            <div class="form-group">
                <label class="control-label">Select list:</label>
                <select class="form-control">
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                </select>
            </div>
        </div>
        <div class="col-sm-2">
            <div class="form-group">
                <label class="control-label" style="display: inline-block;">Select list:</label>
                <select class="form-control">
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                </select>
            </div>
        </div>
        <div class="col-sm-2">
            <div class="form-group">
                <label class="control-label">Select list:</label>
                <select class="form-control">
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                </select>
            </div>
        </div>
        <div class="col-sm-2">
            <div class="form-group">
                <label class="control-label">Select list:</label>
                <select class="form-control">
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                </select>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="form-group">
                <button class="btn btn-default">Filtra</button>
            </div>
        </div>
    </div>
    </form>

how can I get the label side by side the select? I have tried with the form-horizontal but doesn't work.

Thanks


use form-inline instead of form-horizontal and you can also use this link for your references http://getbootstrap.com/css/#forms