Scroll bar on a table with bootstrap

8

I have a table, where I load information from the database into it. It has two columns (CNPJ and Social Reason). The table I mounted with bootstrap. I would like it to have a maximum height and create scrollbar (I find that difficult), as I do not see how to work with grid and mvc. Is there such a possibility? There is a query here at the request of the chafia, to bring everything (imagine the madness of it) of the DB. And there the table gets a huge size.

    
asked by anonymous 27.06.2014 / 15:01

1 answer

8

Simple, in html do so:

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

In CSS

.table-overflow {
    max-height:400px;
    overflow-y:auto;
}

Just implement to your liking.

DEMO

    
27.06.2014 / 15:08