I had a problem when I want to implement my html to rails previously I've made a catalog with 3 columns on the desktop display and 2 columns on a mobile display like this
in desktop display my catalog looks like this
[1] [2] [3] [4] [5] [6]
but when I change to mobile view, they looks like this
[1] [2] [3] [4] [5] [6]
previous syntax that I use to html exactly like the links above the question is where should I put
<div class="clearfix visible-xs-block"></div>
and
<div class="clearfix visible-md-block"></div>
do I have to add "IF" or something else in the loop to add the code? this is my view syntax
<div class="row-store"> <% @games.each do |game| %> <div class="con-space col-xs-6 col-md-4"> <%= image_tag(game.image_url) %> <h3><%= game.title %></h3> <div> <span>Platform: <%= game.platform.name %></span><br/> <span>Price: <%= game.price %> </span> </div> </div> <% end %> </div>
thx