Why is there a minheight?

Why is there a minheight?

lang2lang2 Posts: 5Questions: 0Answers: 0
edited July 2011 in DataTables 1.8
Hi all,

I'm using datatable on my website. Some of the table are rather large but some of them are quite small - say 6 rows. For the small tables, datatable leaves a rather ugly gap afterwards. I checked the CSS and dataTables_wrapper has min-height of 302px, which looks like a random number. Any reason for that?

Thanks

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    just a guess, but it's filling in the amount to maintain the table height as it originally was

    there is a collapse variable to tell it to collapse that space

    [code]
    $(document).ready(function() {
    $('#example').dataTable( {
    "sScrollY": "200",
    "bScrollCollapse": true
    } );
    } );
    [/code]
  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    As fbas notes it is basically to stop the pagination and info element bouncing around with the table as its height varies with the number of rows. You can simply delete that line if you don't want (I'll probably do so for the next major release).

    Allan
This discussion has been closed.