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

    (@tobiasbg)

    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

    Thread Starter sherrillchurch

    (@sherrillchurch)

    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

    Plugin Author TobiasBg

    (@tobiasbg)

    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

    Thread Starter sherrillchurch

    (@sherrillchurch)

    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.

    Plugin Author TobiasBg

    (@tobiasbg)

    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

    Thread Starter sherrillchurch

    (@sherrillchurch)

    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.

    Plugin Author TobiasBg

    (@tobiasbg)

    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!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Centralise text’ is closed to new replies.