Scroll bar on a table with bootstrap

Asked

Viewed 9,035 times

10

I have a table, where I upload database information into it. It has two columns (CNPJ and Social Reason). The table I mounted with bootstrap. I would like her to have a maximum height and create a scroll bar (I think that’s hard), because I don’t see how to work with grid and mvc. Is there such a possibility? There is a consultation here at the request of the chafia, to bring everything (imagine the madness of this) of the BD. And then the table gets a huge size.

  • +1 gets a note: with Bootstrap, dynamic things like bar scroll and adaptive sizes are often simple things to do.

1 answer

9


Simple, in html do so:

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

In the CSS

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

Just implement to your liking.

DEMO

Browser other questions tagged

You are not signed in. Login or sign up in order to post.