• Resolved Dartmoor Dave

    (@dartmoor-dave)


    Hi Tobias,

    My table contains all right aligned text except one column, in the middle, which is left aligned. This brings the data in the columns very close together, so I would like to move just those columns further apart. The only way I could find to do this was to insert an extra very narrow column. This works ok except this column has the arrows for sorting at the top. Can I get rid of these or is there a better way of doing this please?

    Also the column headers break in an ugly way. Can I control where the line breaks are in the headers please?

    My table is here

    https://www.ads-software.com/plugins/tablepress/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Yes, instead adding that extra column, you should use some CSS code like this:

    #content .tablepress-id-3 .column-4 {
      padding-left: 8px;
    }

    For the line breaks in the head row: You can set those manually, by simply pressing “Enter” at the desired places.

    Regards,
    Tobias

    Thread Starter Dartmoor Dave

    (@dartmoor-dave)

    Hi Tobias,

    Thanks once again for a speedy reply – it all works great.

    Some of my columns do not have completed rows, some cells are just blank. These columns do not sort properly. I don’t know if it is possible to get these to sort properly, but if not can I prevent sorting on these columns.

    Regards
    Dave

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Dave,

    good to hear that the CSS changes worked.

    About the sorting: Yes, empty cells can not really be sorted, as the algorithm just does’t know how to handle them.
    To turn off sorting in those columns, please add this to the “Custom Commands” textfield on the “Edit” screen of the table:

    "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 1, 4, 5 ] } ]

    That list of numbers is a list of columns for which sorting is turned off (counting starts with 0).

    Regards,
    Tobias

    Thread Starter Dartmoor Dave

    (@dartmoor-dave)

    Hi Tobias,

    Works perfectly.

    Many thanks once again for your excellent support.

    Regards
    Dave

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Padding between columns and breaks in headings?’ is closed to new replies.