[Answer]-Bootstrap and django keep button and input on same line

1👍

First you need to understand what the following code does. It creates a column of width 9/12 the width of the page.

 <div class="col-md-9">

You might wan to do the following.

<div class="col-md-9">
            <div class="form-group">
                {{ field|addcss:"form-control" }}

            <button type="submit" class="btn btn-primary btn-sm">Filter</button>

            </div>

        </div>

Give explicit width to the button. Check online to give width inline

Leave a comment