How to make table smaller?

How to make table smaller?

onicaonica Posts: 6Questions: 6Answers: 0

Link to test case: https://live.datatables.net/cufobeni/8/edit

Description of problem: I need to make the table smaller. In the live preview all columns,are too big. I need every column to only have 10 or 20px, just to fit the number with 2 digits

Answers

  • allanallan Posts: 62,858Questions: 1Answers: 10,344 Site admin

    You mean you want to remove the padding on the cells? Right click on an element and select "Inspect" to find out what styling is applied to it and from where. You can override the styles if you need to in some custom CSS.

    DataTables' default style does have a compact class that can be applied to the table to reduce the padding, which might be enough for you though: https://live.datatables.net/cufobeni/10/edit

    Allan

Sign In or Register to comment.