css - Aligning Multiple Tables on Different Rows with Bootstrap -


i'm using twitter bootstrap 2 , having issues getting tables align.

i have view in rails app want show 4 tables - 2 tables per row (2 x 2), this:

|   table   ||  table   | |   table   ||  table   | 

instead, i'm getting this:

|   table   ||  table   |          |   table   | |  table   | 

the first 2 tables aligned want, third table not horizontally aligned correctly can't figure out why.

# view <div class="container">       <div class="row">     <%= render :partial=>"article_count", :locals=>{:most_popular_articles=>@most_popular_articles}%>   </div>  </div>  # _article_count <% @most_popular_articles.each |article| %>   <div class="span5">     <table class="table table-hover">       <thead>         <tr>           # header names         </tr>       </thead>       <tbody>         <% user.each |user| %>           <tr>             # field values           </tr>         <% end %>       </tbody>     </table>   </div>   <div class="span1"></div> <% end %> 

here's link page can see how looks, full css , html rendered.

try somthing this:

<% @most_popular_articles.in_groups_of(2).each |article_array|%>     <div class="row">         <% article_array.each |article| %>              <div class="span5">                 <table class="table table-hover">                   <thead>                     <tr>                       # header names                     </tr>                   </thead>                   <tbody>                     <% user.each |user| %>                       <tr>                         # field values                       </tr>                     <% end %>                   </tbody>                 </table>               </div>             <div class="span1"></div>                 <%end%>         </div> <%end%> 

Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -