Bootstrap Responsive Table Not Acting Responsive

Mona Coder picture Mona Coder · Nov 21, 2013 · Viewed 29.1k times · Source

Can you please take a look at this link (Please scroll down to the end of page )and let me know why"
1- Table is not actinf responsive? 2- I want able to control <td> widths by using col-md-3 and col-lg-3 does this works in table as well?

Here is the code I have:

<div class="col-md-offset-1  col-lg-offset-1 col-md-6    col-lg-6">
<table class="table table-hover table-responsive">
<tbody>
<tr>
<td width="174"><strong>7:30 – 8:45 a.m.</strong></td>
<td>Arrival / Health CheckFree Choice in Activity Areas, books, puzzles, matching games, large block building, small blocks, floor toys, Lego, trucks and car play.</td>
</tr>
<tr>
<td><strong>8:45 – 9:00 a.m.</strong></td>
<td>Clean-up, toileting, wash up for snack</td>
</tr>
<tr>
<td><strong>9:00 – 9:30 a.m.</strong></td>
<td>Morning snack</td>
</tr>
<tr>
<td><strong>9:30 -10:00 a.m.</strong></td>
<td>Circle Time: Action songs, singing time, finger plays, hello songs, discussion of daily activities</td>
</tr>
   </tbody>
</table>
</div>

AS you can see I couldn't control the table size with col-md-3 and col-lg-3 so I wraped it in a div but the responsive is not working

Answer

ceejayoz picture ceejayoz · Nov 21, 2013

Please re-read the docs on this feature. The table-responsive class needs to be on a wrapper div, not the table itself.

<div class="table-responsive">
  <table class="table">
    ...
  </table>
</div>