0

如您所见。分页的结果就在商店列表旁边。
它必须低于该值。
我怎样才能做到这一点?

看法

<div class='pagination-centered'>
    <%= page_entries_info(@shops).html_safe %>
    <%= paginate @shops, :window => 4, :outer_window => 5, :left => 2, :right => 2 %>
</div>


<% @shops.each do |shop| %>  
    <%= render 'shops/shop', :shop => shop %>
<% end %>


<div class='pagination-centered'>
    <%= paginate @shops, :window => 4, :outer_window => 5, :left => 2, :right => 2 %>
    <%= page_entries_info(@shops).html_safe %>

图片

图片

更新:这是生成的 HTML。分页必须从新行开始。
它不应该与商店在同一条线上。

<div class='pagination-centered'>
    Displaying <b>all 4</b> shops
</div>  

<span class='shop'>
    <div class="List">
        …shop A...                      
    </div>


    <div class="List">
        …shop B...                      
    </div>

    <div class="List">
        …shop C...                      
    </div>
</span>


<div class='pagination-centered'>
    Displaying <b>all 4</b> shops
</div>
4

1 回答 1

2

如果您的跨度或列表包含浮点数,那就是问题

尝试

<div class='pagination-centered'>
    Displaying <b>all 4</b> shops
</div>  

<span class='shop'>
    <div class="List">
        …shop A...                      
    </div>


    <div class="List">
        …shop B...                      
    </div>

    <div class="List">
        …shop C...                      
    </div>
</span>

<div class="clearfix"></div>

<div class='pagination-centered'>
    Displaying <b>all 4</b> shops
</div>
于 2013-01-09T08:21:10.020 回答