• Resolved acdigital

    (@acdigital)


    Hello Tobias, I am really pleased I found TablePress, its a great plug.

    I am facing a few problems when try to align the search box.
    I am using a table centered 800px in a 100% page.
    The table is aligned fine in the center but the search keeps on the right of the page.

    I tried your suggestion here.

    .dataTables_paginate,
    .dataTables_filter {
      float:none;
      text-align: center;
      margin-left: auto;
      margin-right: auto;
    }
    .dataTables_paginate a {
      float: none;
    }

    But this aligns all of my three tables and need to align only one in the RIGHT side of the 800px not in the table, not in the right side of the table.

    Please see the example bellow.
    Image example

    Many thanks

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

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    You will basically also have to set the width and center the <div> container around the table, with some “Custom CSS” like

    #tablepress-123_wrapper {
      width: 800px;
      margin-left: auto;
      margin-right: auto;
    }

    Regards,
    Tobias

    Thread Starter acdigital

    (@acdigital)

    Hello Tobias, it worked like a charm.

    I will paste the code for someone with limited knowledge like me to get it.

    Insert this in your admin/plugin options/custom css.
    Replace 123 for the id of your table
    
     div#tablepress-123_wrapper {
      width: 800px;
      margin-left: auto;
      margin-right: auto;
    }
    
    Place this around your table in the page/post or wherever you decide to display your table.
    
    <div id=tablepress-123_wrapper>
    [table id=123  /]</div>

    Cheers,
    Paulo

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    hold on here. You should not have to add that <div id=tablepress-123_wrapper> around the table manually, as the DataTables JS library (which bring the search field) does that dynamically already!

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘search alignment with table header right corner’ is closed to new replies.