smaller padding-top/-bottom of DataTables

smaller padding-top/-bottom of DataTables

ludwigmludwigm Posts: 6Questions: 5Answers: 0

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: 14,185Questions: 1Answers: 2,404
    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: 6Questions: 5Answers: 0

    "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.