• (This is really minor, is not affecting me and is for the developers info only).
    Following your website instructions on centering a table (https://tablepress.org/faq/ then “How do I center a table on the page?”), this only seems to have any effect if you disable the use of “DataTables” (Javascript Library).

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    That’s correct. If the DataTables JS library is active, centering shouldn’t really be necessary, as the table should stretch to 100% width. Sometimes, this does not work if the Horizontal Scrolling is enabled. In that case, CSS like

    .dataTables_wrapper .tablepress {
      width: 100% !important;
    }

    can fix this.
    Reducing the width and centering a table with DataTables enabled is however also possible, e.g. with CSS like

    .dataTables_wrapper {
      width: 80%;
      margin: 0 auto !important;
    }

    To only apply this to a certain table, the first line of the command has to be changed to

    #tablepress-123_wrapper {
    

    where 123 is the table ID.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘Centre a Table (trivial issue FYI only)’ is closed to new replies.