html - Django form fields and button appear not in order -
this code of html page in form displayed:
<body> <h1>add category</h1> <form id="category_form" method="post" action="/rango/add_category/"> {% csrf_token %} {% hidden in form.hidden_fields %} {{ hidden }} {% endfor %} {% field in form.visible_fields %} {{ field.errors }} {{ field.help_text }} {{ field }} {% endfor %} <input type="submit" name="submit" value="create category" /> </form> </body> this how form getting displayed: 
what missing in code? i'm following the twd tutorial
output according tutorial:

inputs , buttons inline elements appear in same row. resize browser window , button moved next row other text element.
if want place button under inputs regardless of window width put button block element <div> or <p>:
<div> <input type="submit" name="submit" value="create category" /> </div>
Comments
Post a Comment