Phil
Phil

Reputation: 2236

how to keep bootstrap form button inline

When I put this button in a form it starts a new line but I want it to say inline. I tried adding class="form-inline" but it doesn't work. I must be bad at searching online because I can't find the right answer myself.

What is the bootstrap convention to keep it inline?

<div class="col-sm-12">
<table>
    <thead>
        <tr>
            <th>Edit</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <a class="inline btn btn-info btn-xs glyphicon glyphicon-pencil"></a>
                <button class="form-inline glyphicon glyphicon-trash btn btn-xs btn-danger del" type="button"></button>                 
            </td>
        </tr>
    </tbody>
</table>

Fiddle

Upvotes: 0

Views: 195

Answers (1)

Ted
Ted

Reputation: 14927

Just alter your markup a little:

Like this demo

<td> 
    <form class="form-inline" method="POST">
        <a class="btn btn-info btn-xs glyphicon glyphicon-pencil"></a>
        <button class="glyphicon glyphicon-trash btn btn-xs btn-danger del" type="button"></button>
    </form>
</td>

Upvotes: 1

Related Questions