Okay
  Public Ticket #2781984
table cell padding
Closed

Comments

  • mary martin started the conversation

    Is it possible to add css to wpdatatables settings so that the padding at the top and bottom of cells is smaller? 

  • [deleted] replied

    Hi Mary

    Thank you for reaching out to us.

    You can use this CSS for tables from the related link :

    // for cell in table
    .wpdt-c.wdt-skin-aqua .wpDataTablesWrapper table.wpDataTable.wpDataTableID-4 td,
    .wpdt-c.wdt-skin-aqua .wpDataTablesWrapper table.wpDataTable.wpDataTableID-1 td {padding: 0 20px !important;}
    // for cells in header
    .wpdt-c.wdt-skin-aqua .wpDataTablesWrapper table.wpDataTable.wpDataTableID-1 thead th,
    .wpdt-c.wdt-skin-aqua .wpDataTablesWrapper table.wpDataTable.wpDataTableID-4 thead th
    {padding: 0 16px !important;}

    We inserted 0 for top and bottom padding but you can choose whatever you need( for example 1px,2px..)

    I hope this helps, do let us know if you need any further assistance.


  • mary martin replied

    With no css (which I understand is padding =0px, this is what my output looks like. I changed the tableID to match mine, and skin=aqua, and even tried setting to a large padding value, and nothing changes. I checked my main css and I don't have any table-related css that would be overriding this. I would like reduced padding above and below text, but am still struggling to make this happen.

    Mary

    1730297667.png


  • [deleted] replied

    Hi Mary

    Could you please send us the URL of the page so we can inspect it?

    Thank you