• Resolved maik1976

    (@maik1976)


    Hello,

    i use the Theme Bridge and wordpress 4.6.3 (german).

    Two of my tables i cannot center. Can you tell me why?
    I found the problem with the firefox-developer-mode:

    .dataTables_wrapper .tablepress {
    clear: both;
    margin: 0 !important;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-left: 0px;
    }
    .tablepress-id-1 {
    width: auto;
    margin: 0 auto 1em;
    }

    As soon as I remove the position in the firefox-developer-mode, the table is centered.
    But, where can i kill the “margin: 0 !important;” under .dataTables_wrapper .tablepress ?

    Is this a tablepress-/theme-/settings- or brain-problem?? ??

    Greetings from Münster – Germany
    Maik

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Centering is a bit more tricky when the DataTables features are used, due to the extra container around the table. Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter maik1976

    (@maik1976)

    Thanks for the fast answer!!!

    https://wakage.de/index.php/tabellentest-2/

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the link!
    In this case, the “Custom CSS”

    .dataTables_wrapper .tablepress-id-1 {
        width: auto;
        margin: 0 auto 1em !important;
    }

    should work.
    Please place this into the “Custom CSS” text field on the “Plugin Options” screen of TablePress.
    It seems that you also have similar CSS in your theme’s “Custom CSS” somewhere, please remove that to avoid interference.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problems with center the table’ is closed to new replies.