• Resolved ronnieb

    (@ronnieburn)


    Hi

    How do I center an image in tablepress.

    I have managed to do the text, when I add an image from media I tick it to be displayed centrally – but it’s still on the left.

    tried adding css to the plugins pages but still doesn’t work

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This depends on your theme and on how it handles images. Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter ronnieb

    (@ronnieburn)

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for that!

    To center those images, please try adding this to the “Custom CSS”:

    .tablepress-id-1 img {
      display: inline;
    }

    Additionally, you will have to fix an issue in the CSS

    .tablepress-id-2 .row-1,
    .tablepress-id-2 .row-2,
     {
    	text-align: center;
    }

    There must not be a comma right before the {, so please change that to

    .tablepress-id-2 .row-1 td,
    .tablepress-id-2 .row-2 td {
    	text-align: center;
    }

    Additionally, we can vastly reduce the CSS for that largest block of CSS that you are using to center the cells in table 1. Please try replacing that large chunk with

    .tablepress-id-1 th,
    .tablepress-id-1 td {
    	text-align: center;
    }
    .tablepress-id-1 .column-1,
    .tablepress-id-1 .row-14 td {
    	text-align: left;
    }

    Regards,
    Tobias

    Thread Starter ronnieb

    (@ronnieburn)

    You are an absolute star

    Thank you so much, works perfectly ??

    Ronnie

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Image central’ is closed to new replies.