如图所示。分页的结果就在商店列表的旁边
它必须低于这个。
我怎么能这样做?
查看
<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>
答案 0 :(得分: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>