Title: Center Table &amp; Reduce Width
Last modified: August 21, 2016

---

# Center Table & Reduce Width

 *  Resolved [MelissaLaverty](https://wordpress.org/support/users/melissalaverty/)
 * (@melissalaverty)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/center-table-reduce-width/)
 * I created a table (such a great plug-in) and I used this code to center it and
   shrink the width using this code I found in your Support Forums.
 * .dataTables_wrapper .tablepress {
    width: auto; margin: 0 auto 1em !important;}
 * I expected it would format all subsequent tables similarly, but unfortunately,
   even with the same column widths, I can’t get my newest table to act the same
   way.
    [http://www.pipeline-management.com/table-salesforce/](http://www.pipeline-management.com/table-salesforce/)
 * Thank you!
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/center-table-reduce-width/#post-4769672)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * The reason for this is that this table does not use the DataTables JS features,
   and therefore does not get that `dataTables_wrapper` CSS class.
    The fix is however
   easy: Just remove that CSS class from the CSS code, i.e. change it to
 *     ```
       .tablepress {
         width: auto;
         margin: 0 auto 1em !important;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [MelissaLaverty](https://wordpress.org/support/users/melissalaverty/)
 * (@melissalaverty)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/center-table-reduce-width/#post-4769713)
 * Perfect! Thank you.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/center-table-reduce-width/#post-4769729)
 * 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](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!

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

The topic ‘Center Table & Reduce Width’ 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/)

## Tags

 * [center](https://wordpress.org/support/topic-tag/center/)
 * [table](https://wordpress.org/support/topic-tag/table/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/center-table-reduce-width/#post-4769729)
 * Status: resolved