Title: Center align text
Last modified: August 20, 2016

---

# Center align text

 *  Resolved [Agha Mehdi](https://wordpress.org/support/users/agha-mehdi/)
 * (@agha-mehdi)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/)
 * Hi there,
 * I am looking to align all the text in a certain cell to the center. I’m sure 
   its very simple but I’m very new to this and I would appreciate some advice.
 * Cheers
 * Mehdi
 * [http://wordpress.org/extend/plugins/tablepress/](http://wordpress.org/extend/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/#post-3487420)
 * Hi,
 * thanks for your question.
    To do that, you will need a little bit of CSS code.
   Please see this article in the FAQ to understand how to influence a single cell:
   [http://tablepress.org/faq/highlight-cells-or-content/](http://tablepress.org/faq/highlight-cells-or-content/)
   Instead of changing the background color as in that example, you’ll then need
   this CSS code to center:
 *     ```
       text-align: center;
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [Agha Mehdi](https://wordpress.org/support/users/agha-mehdi/)
 * (@agha-mehdi)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/#post-3487452)
 * Hi Tobias,
 * Thank you for the reply. I tried what you said and unfortunately, I think mostly
   due to my lack of experience, I cant get it to work. I need numerous cells to
   be centrally aligned and neither have done so.
 * I’ll copy the code into here and let me know what I’m doing wrong. Thank you 
   very much in advance>
 * .tablepress-id-4 .row-1 .column-a {
    text-align: center; }
 * .tablepress-id-4 .row-1 .column-b {
    text-align: center; }
 * .tablepress-id-4 .row-1 .column-c {
    text-align: center; }
 * .tablepress-id-4 .row-1 .column-d {
    text-align: center; }
 * .tablepress-id-4 .row-2 .column-a {
    text-align: center; }
 * .tablepress-id-4 .row-2 .column-b {
    text-align: center; }
 * .tablepress-id-4 .row-2 .column-c {
    text-align: center; }
 * .tablepress-id-4 .row-2 .column-d {
    text-align: center; }
 * .tablepress-id-4 .row-4 .column-a {
    text-align: center; }
 * .tablepress-id-4 .row-4 .column-b {
    text-align: center; }
 * .tablepress-id-4 .row-4 .column-c {
    text-align: center; }
 * .tablepress-id-4 .row-4 .column-d {
    text-align: center; }
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/#post-3487454)
 * Hi,
 * basically, you will just have to use the column number instead of the letter.
   Additionally, you can shorten that CSS a lot:
 *     ```
       .tablepress-id-4 .row-1 .column-1,
       .tablepress-id-4 .row-1 .column-2,
       .tablepress-id-4 .row-1 .column-3,
       .tablepress-id-4 .row-1 .column-4,
       .tablepress-id-4 .row-2 .column-1,
       .tablepress-id-4 .row-2 .column-2,
       .tablepress-id-4 .row-2 .column-3,
       .tablepress-id-4 .row-2 .column-4,
       .tablepress-id-4 .row-4 .column-1,
       .tablepress-id-4 .row-4 .column-2,
       .tablepress-id-4 .row-4 .column-3,
       .tablepress-id-4 .row-4 .column-4 {
         text-align: center;
       }
       ```
   
 * If you post the link to the page with the table, I’ll gladly take a look to see
   if we can make this even shorter.
 * Regards,
    Tobias
 *  Thread Starter [Agha Mehdi](https://wordpress.org/support/users/agha-mehdi/)
 * (@agha-mehdi)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/#post-3487455)
 * Thank you.
 * Here is the link:[http://goirani.com/each-package-payment-options/](http://goirani.com/each-package-payment-options/)
 * I am trying to create a table which I have created in MS Word. I can send you
   a version if you like.
 * Thank you. Much respect for your work here.
 * Mehdi
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/#post-3487456)
 * Hi Mehdi,
 * thanks for the link. Unfortunately, I can’t open the page, as it just asks me
   for an email address 🙁
    Additionally to the link, can you post which cells you
   want centered?
 * Regards,
    Tobias
 *  Thread Starter [Agha Mehdi](https://wordpress.org/support/users/agha-mehdi/)
 * (@agha-mehdi)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/#post-3487494)
 * Hi Tobias,
 * Sorry for the mistake there.
 * I am wanting to center all the text in column 2.3.4 on all rows up to row 20.
   
   Here is the link. [http://goirani.com/listing-package-tick-table/](http://goirani.com/listing-package-tick-table/)
 * It seems like I have ti scroll to the next page to see all the rows. Can I make
   them all appear on the same page?
 * Thank you
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/#post-3487496)
 * Hi,
 * unfortunately, I still can’t see the table 🙁 It’s still asking me to enter my
   email address to get notified…
 * Centering those cells should not be a problem, but I’d need to see the table 
   to be sure.
 * To make all rows appear on the same page, just uncheck the “Pagination” checkbox
   on the table’s “Edit” screen.
 * Regards,
    Tobias
 *  Thread Starter [Agha Mehdi](https://wordpress.org/support/users/agha-mehdi/)
 * (@agha-mehdi)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/#post-3487497)
 * Hey Tobias, Sorry about that. Its been disabled so you should be able to go in
   and check that.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/#post-3487498)
 * Hi,
 * thanks, no I can see the table. 🙂
 * Please replace all of your “Custom CSS” with this:
 *     ```
       .tablepress-id-5 img {
           margin: 0;
           border: 0;
           background-color: transparent;
       }
       .tablepress-id-5 .column-2,
       .tablepress-id-5 .column-3,
       .tablepress-id-5 .column-4 {
           text-align: center;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [Agha Mehdi](https://wordpress.org/support/users/agha-mehdi/)
 * (@agha-mehdi)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/#post-3487499)
 * Absolutely perfect. Thank you for the support and the great plugin.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/center-align-text/#post-3487500)
 * Hi,
 * great! 🙂 And no problem, you are very welcome!
 * Best wishes,
    Tobias

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

The topic ‘Center align text’ 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

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

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