GlinesMome GlinesMome - 10 months ago 52
CSS Question

Table auto-scroll with min height

I'm using Twitter Bootstrap and I have a pretty annoying problem.
I have a table (call F) with a row and two cells, in the first cell I have another table (called T) and in the second cell some content (called C), see

<table class="table table-striped">

Here is the big deal: T has to contain a huge number of rows and C doesn't have much content, it may be empty.

I want that that T takes all the avaliable place or, if C is smaller, at least prints 3 rows.

I tried fixedheadertable but it is a fixed size height and it has some bugs.

Edit: by "at least prints 3 rows", I mean that T must have a min height that allows to display at least three rows".

Answer Source

Finally I make it fixed in pure CSS.

Thanks to this: Twitter Bootstrap scrollable table rows and fixed header

Then I have no more print issues.