Search code examples
twitter-bootstrapbootstrap-table

Bootstrap-table, overflow


I've tried Bootstrap-table (http://bootstrap-table.wenzhixin.net.cn/), for filtering and pagination.

Works fine, but when I put a dropdown in the table you have to scroll to show it.

<table id="ex" class="table table-striped table-condensed table-hover">
  <thead class="thead-inverse">
    <tr>
      <th></th>
      <th>Date</th>
      <th>Customer</th>
      <th>Amount</th>
      <th>Status</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>#
      </td>
      <td>
        <nobr>2015-03-03</nobr>
      </td>
      <td>Test</td>
      <td>
        <nobr>8 000,00</nobr>
      </td>
      <td>OK</td>
    </tr>
    <tr>
      <td>#</td>
      <td>2015-03-04</td>
      <td>Test</td>
      <td>433,33</td>
      <td>OK</td>
    </tr>
    <tr>
      <td>
        <div class="btn-group">
          <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
        Action
        <span class="caret"></span>
    </a>
          <ul class="dropdown-menu">
            <li>First menu item</li>
            <li>Second menu item</li>
          </ul>
        </div>
      </td>
      <td>2015-03-06</td>
      <td>Test</td>
      <td>33,12</td>
      <td>OK</td>
    </tr>
  </tbody>
</table>

https://jsfiddle.net/qr3ao2e3/

Do you have any solutions?


Solution

  • The .fixed-table-body class has the overflow X and Y properties set to auto which means:

    auto - Should cause a scrolling mechanism to be provided for overflowing boxes

    This fixes it

    .fixed-table-body {
        overflow-x: visible;
        overflow-y: visible;
        height: 100%;
    }
    

    See your updated fiddle here. Hope that helps.