0

Hi I am new to html design and learning... I am rendering some content from a django service onto a html template i am not able to set the page in such a way the if a condition is satisfied it goes the top of the html page and if the condition is not satisfied it goes to the bottom of the page like

{% for t in list %}
    {% if not t.appendix %}
         <div id="content">
                Content
          </div>
    {% else %}
         <div id="appendix">
                appendix
          </div>
    {% endif %} 
    {% endfor %}     

And the HTML page should be like

Content 1
Content 2
Content 1
Content 2 

Appendix 1
Appendix 1
Appendix 1
Appendix 1

Now i get like

Appendix 1
Content 1
Appendix 2
Content 2

Edited by HtmlStart

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by almostbob
0

id is unique may only contain 1 item, duplicating id may cause problems in compliant browsers
class contains one or more items
positioning is done easiest by css styling the classes

<div id='singular'> this div has an id, the id can only be used by this div and no other</div>
<div class='appendix'> This div is one of many, that class is multiple </div>
<div class='appendix'> This div is one of many, that class is multiple </div>
<div class='appendix'> This div is one of many, that class is multiple </div>

in the head or external style sheet class appendix can be styled for position exactly how has drawn a blank, major messup apologies

just thoughts, try one of the online tutorial sites for better answer (sorry no link)

Dos Vdanye

Edited by almostbob

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.