• Resolved bloggingbeats

    (@amitgargjind)


    Hey

    I need to align the table in the middle.
    I have also added custom CSS commands

    .tablepress-id-4 {
    width: auto;
    margin: 0 auto 1em;
    }

    Here my table id is 4.
    Still, I am not able to do the same.
    any help will be very appreciated

    The page I need help with: [log in to see the link]

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    You are actually “victim” of a problem in the JavaScript code for the horizontal scrolling feature here. Normally, the table would stretch to the full width. To achieve that again, please add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

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

    Then, to shrink and center it again (if still desired), please add this as well:

    #tablepress-4_wrapper {
      width: 600px;
      margin: 0 auto;
    }

    Regards,
    Tobias

    Thread Starter bloggingbeats

    (@amitgargjind)

    Hey Tobias

    Thank you so much.
    Really appreciated.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I center a table on the page?’ is closed to new replies.