django-bootstrap3 fields width control

795 Views Asked by At

I'm using https://github.com/dyve/django-bootstrap3 plugin for my project with following code

<div class="container">
        <div class="row">
            <div class="jumbotron">
                <div class="text-center">
                    <h1>{% block header_text %}{% endblock %}</h1>
                    <form method="post" class="form-inline">
                        {% csrf_token %}
                        Input: {% bootstrap_field form.input layout='inline' %}
                        Object: {% bootstrap_field form.object layout='inline' %}
                        <input type="submit" class="btn btn-xs btn-primary" value="Submit"/>
                    </form>
                </div>
            </div>
        </div>

And get this fields as result enter image description here How can i control width of them?

I tried to change it in .css file, but it only works with focus .form-control:focus {width: 320px}

1

There are 1 best solutions below

1
On BEST ANSWER

Solved by addition "id": "input-form" to form widget and adjusting #input-form in .css file.