Skip to content

Instantly share code, notes, and snippets.

@rummelonp
Last active December 22, 2015 17:49
Show Gist options
  • Save rummelonp/6508297 to your computer and use it in GitHub Desktop.
Save rummelonp/6508297 to your computer and use it in GitHub Desktop.
float でタイル上に並べてるやつを強制的に横に並べて横スクロールにしたい
<div class="container clearfix" style="overflow-x: auto; width: 900px;">
<div class="sub-container" style="width: <%= @parts.size * 300 %>px;">
<% @parts.each do |part| %>
<div class="parts pull-left" style="width: 300px;">...</div>
<% end %>
</div>
</div>
<div class="container clearfix" style="width: 900px;">
<% @parts.each do |part| %>
<div class="parts pull-left" style="width: 300px;">...</div>
<% end %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment