ruby on rails - Twitter bootstrap fixing viewing area of a table -


i building dashboard rails 4 , twitter bootstrap. show.html.erb looks this:

 <% if @store_entries %>     <table class="table table-striped">         <thead>             <tr>                   <th>a</th>                 <th>b</th>                 <th>c</th>                 <th>d</th>                 <th>e</th>             </tr>         </thead>         <tbody>             <%@store_entries.each |value| %>                 <tr>                      <td><%= value['a']%></td>                     <td><%= value['b']%></td>                     <td><%= value['c']%></td>                     <td><%= value['d']%></td>                     <td><%= value['e']%></td>                 </tr>             <% end %>         </tbody>     </table> <% else%>     <p>no entires display</p> <% end%> 

the problem facing is: content of each value quite long , result table doesn't fit horizontally on browser window. table fit browser window user doesn't have scroll horizontally. new both bootstrap , rails.

please put table in div element , give max width div

example:

<div style="width:400px;">    table content </div> 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -