Jacobm001
Jacobm001

Reputation: 4549

Bootstrap: Placeing items side by side

I'm making a form in bootstrap and AngularJS, and am trying to make a button appear by the side of a text input. The idea is that this will add to an array (length unknown) I have the backend working but using the html:

<div class="form-group">
    <label for="item_list">Items</label>
    <ul>
        <li ng-repeat="i in items">{{ingr}}</li>
    </ul>

    <input type="text" class="form-control" id="item_list" placeholder="Add item"> <button class="btn btn-primary">Add</button>
</div>

I can't seem to find a class built into bootstrap that will make these sit side-by-side. Any ideas?

Upvotes: 0

Views: 329

Answers (1)

Robert
Robert

Reputation: 103

Check out the this fiddle.

Need to wrap it in an inline form tag:

<form class="form-inline" role="form"></form>

Upvotes: 1

Related Questions