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

    (@tobiasbg)

    Hi,

    sorry for the long delay, I was on holidays and could not reply earlier.

    This is caused by a bug in the DataTables JS library, where it can not determine the width properly. To fix this, please try add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

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

    Regards,
    Tobias

    Thread Starter masterez

    (@masterez)

    Hello Tobias,

    thank you for your reply.

    I added the provided CSS to the custom CSS text area, but it hasn’t fixed my problem.

    Is there an other option?

    Thank you in advance.

    Best regards,
    Ismar

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Ismar,

    did you clear the cache of the CSS minification plugin that you are using? I don’t see the CSS in the cached file, which might be the reason for this.

    Regards,
    Tobias

    Thread Starter masterez

    (@masterez)

    Hello Tobias,

    I deactivated the plugin now, but still the same.

    Any ideas?

    Regards,
    Ismar

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks! From what I can see, there’s a . missing in front of the CSS command. Please compare it to what I posted above.

    Regards,
    Tobias

    Thread Starter masterez

    (@masterez)

    Yes, this helped. Thank you very much.
    But the table is now full width. How can I make it fit to the content?

    Thank you in advance.

    Best regards,
    Ismar

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    if you don’t want it full width, the search field will not match again.
    You would therefore need to reduce the width of the container, e.g. with

    .dataTables_wrapper {
      width: 500px;
      margin: 0 auto;
    }

    Regards,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Search field and table center’ is closed to new replies.