Support » Plugin: TablePress » How can I center text of the Entire table, All cells

  • Resolved wordpressnewborn

    (@wordpressnewborn)



    I want to center all text on an entire table.

    Not just one row, or column or cell

    but I want to center All cells of the table.

    I am using colonspan on just the header

    Can someone tell me the code to center alll text of alll the cell for one entire table ?

    Thanks 🙂

    I Love Tablepress !

    https://wordpress.org/plugins/tablepress/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    I use this:

    .tablepress-id-1 tbody td {
    	text-align: center;
    	vertical-align: middle;
    }

    which centers the content of each cell horizontally and vertically.

    Hope this helps. 🙂

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Yes, the code that teracow posted is perfect for this 🙂
    To also catch the header row, you could extend it to

    .tablepress-id-1 thead th,
    .tablepress-id-1 tbody td {
    	text-align: center;
    	vertical-align: middle;
    }

    Regards,
    Tobias

    Thanks that did the trick !

    The first one

    Thanks Mr. Tobias

    Next I was looking for the code to change the font color of ALLLL Tabless and ALLL Cells

    Would you happen to have the code for that also ?

    Thanks so much for your help.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    great to hear that this helped!

    Sure, that’s similar:

    .tablepress thead th,
    .tablepress tbody td {
    	color: #ff0000;
    }

    Regards,
    Tobias

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can I center text of the Entire table, All cells’ is closed to new replies.