Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Please change your “Custom CSS” from

    .tablepress .row td {
    	font-weight: bold;
    	vertical-align: middle;
    	text-align: center;
    }

    to

    .tablepress tbody td {
    	font-weight: bold;
    	vertical-align: middle;
    	text-align: center;
    }

    That will center everything and make it bold.

    Regards,
    Tobias

    Thread Starter EDV11

    (@edv11)

    Thank you for the fast answer.

    No luck. All the details stay in the same place. I have tried to empty cache and also disabled the W3 plugin entirely, just in case, but the text does not get centered.

    Regards

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    please try again with the code from above. There was a typo in my first reply.

    Regards,
    Tobias

    Thread Starter EDV11

    (@edv11)

    You are right. I didn’t even check the code to see the typo for the td, sorry for that.

    I’m half way there… now everything is centered BUT the top row, that it keeps on the left.

    Regards

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    to also change the header row, please extend the code to

    .tablepress thead th,
    .tablepress tbody td {
    	font-weight: bold;
    	vertical-align: middle;
    	text-align: center;
    }

    Regards,
    Tobias

    Thread Starter EDV11

    (@edv11)

    Ok, so after many tries and a little bit of thinking around… I made it!!

    Here is the final CSS used

    .tablepress tbody td {
    	vertical-align: middle;
    	text-align: center;
    }
    
    .tablepress thead th,
    .tablepress tfoot th {
    	font-weight: bold;
    	vertical-align: middle;
    	text-align: center;
    }

    Thanks again!

    Thread Starter EDV11

    (@edv11)

    You posted some seconds before me. The code is a little bit different, but it also works.

    Thanks!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, I basically just shortened the code by combining the CSS blocks that set the same properties. Both will work ??

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Align text to the center on all the tables’ is closed to new replies.