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: output

what missing in code? i'm following the twd tutorial

output according tutorial:

desired output

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

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -