Title: Column text align center
Last modified: August 30, 2016

---

# Column text align center

 *  Resolved [midrik](https://wordpress.org/support/users/midrik/)
 * (@midrik)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/column-text-align-center/)
 * Hi,
 * Awesome plugin, thank you for you effort!
 * (Im using the most recent version 1.6.1)
 * Im trying to center text in all tables on my site, except I always want column
   number 1 to be left aligned.
 * So I need:
 * Left – Center – Center – Center – etc..
 * Im trying to use:
 * .tablepress-id-2 .column-2,
    .tablepress-id-2 .column-3, .tablepress-id-2 .column-
   4, .tablepress-id-2 .column-5, .tablepress-id-2 .column-6, { text-align: center;}
 * I know Im targeting a specific table in the above but thats only for testing.
   Not sure how I can make this apply to all tables?
 * Additionally it does not center anything for me on table with id 2.
 * Here is a link to my site:
 * [http://backup.is/landvelar/shop/lagnaefni/ror/hathrysti-stal-og-rydfri/hathrysti-stal-og-rydfri/](http://backup.is/landvelar/shop/lagnaefni/ror/hathrysti-stal-og-rydfri/hathrysti-stal-og-rydfri/)
 * I know almost nothing about css so I would appreciate if you could help me with
   this.
 * 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)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/column-text-align-center/#post-6789678)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * To target all tables, just use the `.tablepress` selector. Additionally, you’ll
   have to make sure that there’s not comma right before the `{`.
    It might also
   be easier (and shorter code) to set the alignment to center for all cells first,
   and then set it to left-aligned again for the first column. In summary, please
   try this CSS code:
 *     ```
       .tablepress th,
       .tablepress td {
         text-align: center;
       }
       .tablepress .column-1 {
         text-align: left;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [midrik](https://wordpress.org/support/users/midrik/)
 * (@midrik)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/column-text-align-center/#post-6789695)
 * Thank you so much Tobias, its perfect now 🙂
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/column-text-align-center/#post-6789699)
 * 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 ‘Column text align center’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/column-text-align-center/#post-6789699)
 * Status: resolved