A table with a fixed height and width for the header and cap using Bootstrap 3

I would like to have a table with the following functions:

  • fixed header
  • fixed height (with visible scrollbars)
  • 3 fixed-width columns (one large column and two narrow columns).

I started using:

tbody { display:block; overflow:auto; height:100px; }

To get at least a fixed height, but this rule compresses the table on the left (if necessary, provides a screenshot).

The table is contained in the Bootstrap 3 column.

Here is an example http://jsfiddle.net/PGEdK/

Any ideas? Thanks in advance.

+4
source share
2 answers

JS FIDDLE DEMO, , . , . th td. , :

tr {display: block; }
th, td { width: 300px; }
tbody { display: block; height: 100px; overflow: auto;} 

, , th tr, th : block style to . , tr, th, .

.tablecontainer, .

+8

max-height max-width.

0

All Articles