django endless pagination making the second page to use different css in bootstrap -
i using django-endless-pagination twitter style pagination , twitter bootstrap on website.
now, django-endless-pagination, when first page displayed, system using below style.
.row-fluid .offset1:first-child { margin-left: 8.547008547008547%; }
but second page onwards, style used first element below.
.row-fluid .offset1 { margin-left: 11.11111111111111%; }
as margin-left different both pages first element, rows not aligned between page 1 , page 2. how change this, second page first element uses first-child style , aligned.
edit :-
my code looks below in template
<div class="offset1 span10"> <div class="span4"> {% lazy_paginate column_1_items_list %} {% if column_1_items_list %} {% column_1_item in column_1_items_list %} <div class="row-fluid image_div" style="padding-top:20px"> <h4 class="text-center"><a href="link">name_of_item</a></h4> <a target="_blank" href="link_for_item"> <img class="item-size" src="photo.url" alt="name_of_item "/> </a> <p> quick_summary|safe </p> <div class="row-fluid bottom"> <span class="price"><b>£ price</b></span> </div> </div> {% endfor %} {% endif %} {% show_more " " %} </div> </div>
thanks sreekanth
you use forloop.first
, add class css.
{% column_1_item in column_1_items_list %} <div class="row-fluid image_div{% if forloop.first %} first_child{% endif %}" style="padding-top:20px"> ... {% endfor %}
Comments
Post a Comment