Title: Centre Table Not Working
Last modified: November 13, 2019

---

# Centre Table Not Working

 *  Resolved [psamathe](https://wordpress.org/support/users/psamathe/)
 * (@psamathe)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/centre-table-not-working/)
 * But only for tables with hidden columns using the +/- system (show/hide). In 
   my case the hidden (show/hide) columns contain images so the page load is a bit
   slow and, when the page is refreshed, initially the table is shown centred but
   once the images have downloaded the table jumps to be left aligned.
 * I’ve tried
 *     ```
       .tablepress-id-17 {
       	width: auto;
       	margin: 0 auto 1em;
       }
       ```
   
 * and experimented with
 *     ```
       .tablepress-id-17 {
       	width: auto;
       	margin: 0 auto 1em;
       	align-self: center;
       }
       ```
   
 * but they have no effect
 * Happens on all similar tables but as some are wider than others it is more obvious
   on some than others. A good example in the website link associated with this 
   topic.
 * Installed Tablepress plugins:
    Tablepress (the main plug-in) TablePress Extension:
   Responsive Tables TablePress Extension: Row Details
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcentre-table-not-working%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [psamathe](https://wordpress.org/support/users/psamathe/)
 * (@psamathe)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/centre-table-not-working/#post-12126632)
 * Additional info:
    It seems to relate to shortcode parameters. Shortcode used 
   is `[table id=3 responsive=scroll datatables_row_details=true datatables_row_details_columns
   ="F-G" /]` but remove the “responsive=scroll” and the table becomes full width
   so you can’t tell if it’s centred or not. So might be expected behaviour or not
   or I’m confused …
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/centre-table-not-working/#post-12126775)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Please add this to the “Custom CSS” textarea on the “Plugin Options” screen of
   TablePress:
 *     ```
       .dataTables_wrapper .tablepress {
         width: 100% !important;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [psamathe](https://wordpress.org/support/users/psamathe/)
 * (@psamathe)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/centre-table-not-working/#post-12126795)
 * Makes the table full width but I was after cantering the “auto” width table.
 * (Thanks for reply)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/centre-table-not-working/#post-12126860)
 * Hi,
 * yes, this makes it full-width, which however is the best solution here. Auto-
   width is extremely hard with dynamic content (from the expanding rows with the
   images).
 * Regards,
    Tobias

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Centre Table Not Working’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/centre-table-not-working/#post-12126860)
 * Status: resolved