title: Change first element style in django template loop divided in if else case
body: <p>I have a loop in my djnago template which is divided in if else case and I need to <strong>change</strong> the first element style in <strong>only</strong> *<em>if</em>* <strong>case</strong> </p>
  
  <pre><code>&lt;b&gt;&lt;ul&gt;
      {% for i in prosize %}
          {% if i.num_in_stock &gt; 0 %}
              &lt;li &gt;&lt;a  class="order" id="{{i.option1}}" href="javascript:setSize('{{i.option1}}')"&gt;{{i.option1}}&lt;/a&gt;&lt;/li&gt;//**i need to chnage the first element style in this case** 
          {% else %}
               &lt;li&gt;&lt;a style="background-color:#c2c2c2;color:#000;" href="#myModal" role="button" data-toggle="modal" &gt;{{i.option1}}&lt;/a&gt;&lt;/li&gt;
          {% endif %} 
      {% endfor %}
  &lt;/ul&gt;&lt;/b&gt;
  </code></pre>
  
  <p>please suggest how can I do this ?</p>