smaller padding-top/-bottom of DataTables

smaller padding-top/-bottom of DataTables

ludwigmludwigm Posts: 10Questions: 7Answers: 1

Hi,
I like to have smaller padding-top and padding-bottom of the cells of the DataTable. Currently they are 8px, which is too big.
How can I do this.
I created the table with the bootstrap classes table table-striped table-hover table-bordered and initialized the DataTable with

$(document).ready( function () {
            var table = $('#table_id').DataTable({
                order: [1,'asc'],
                pageLength: 7
            });
        } ); 

This question has accepted answers - jump to:

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    Answer ✓

    You could tweak that in CSS, or perhaps just use the compact style,

    Colin

  • PareshKumarPareshKumar Posts: 31Questions: 14Answers: 1
    Answer ✓

    Hi @ludwigm,

    Try using class "compact".

    Thanks,
    Paresh

  • ludwigmludwigm Posts: 10Questions: 7Answers: 1

    "compact style" is already better, leading to 4px padding. I would like to have it a little smaller though

Sign In or Register to comment.