Hi,
thanks for your question, and sorry for the trouble.
That should be possible with some “Custom CSS” code on the “Plugin Options” screen of TablePress like this:
.tablepress-id-123 th,
.tablepress-id-123 td {
text-align: center;
}
Just change the table ID as necessary.
Regards,
Tobias
Thank you for your speedy response.
Still a bit stuck though. Is this what I need to add to the plugin options page showing my table ID or have I done it wrong??
.tablepress-id-[table id=1 /] th,
.tablepress-id-[table id=1 /] td {
text-align: center;
}
Will that code also centre align images as well or do I need to also put image-align: center
Hi,
what you added there is the Shortcode. The table ID is just that number inside the Shortcode, in your example the 1, i.e.:
.tablepress-id-1 th,
.tablepress-id-1 td {
text-align: center;
}
Centering images can be a little bit more tricky (using image-align will not work, unfortunately), depending on the theme. I suggest to try that code first, and if it does not work, I’ll take a look at your site.
Regards,
Tobias
Hi Tobias
Thank you that’s great, it’s worked now.
I tried adding image-align: center but no luck with it. The text colour in the editor turns red and doesn’t save.
I would point you to my site but haven’t uploaded it yet as still working on it before I do.
Thank you for your excellent support.
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Yeah, centering images is not that easy then 🙁 I suggest that we look at this once your site is live on the internet.
Regards,
Tobias
Hi
I’ve only gone and done it. I put this code before the image and it has worked:
<p align=”center”>
Really pleased 🙂
Yep I’ll let you know when the sites live and I’ll also send in my donation.
Thanks again Tobias.
Hi,
yes, that should indeed work (although it requires a little extra HTML). 🙂
Good to hear that you like the plugin, and thanks for wanting to donate! I really appreciate it!
Best wishes,
Tobias
P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!