• Resolved armandoarrastia

    (@armandoarrastia)


    Hi Tobias. I hope you’re doing well.

    On the referenced page, I have included a table underneath the “Superintendents Summit” logo graphic that includes two buttons. I am trying to center the table so the buttons line up better under the image.

    I have inserted the code you recommend in the documentation on this page: https://tablepress.org/faq/center-table-on-the-page/ (the code is also pasted below), but it is not centering.

    Any suggestions for me?

    Many thanks!

    Here is the CSS code:

    .tablepress-id-10 {
    width: auto;
    margin: 0 auto 1em;
    }

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter armandoarrastia

    (@armandoarrastia)

    And, in case it helps, here is a screenshot: https://www.screencast.com/t/3PVZdwHhWSe

    Thanks again.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The reason for this essentially is some interference by your theme, which is setting a 100% table width, but with a higher priority than your CSS.
    However, it would likely be easier to actually center the content in the cells. So, please try with

    .tablepress-id-10 {
      text-align: center;
    }

    Regards,
    Tobias

    Thread Starter armandoarrastia

    (@armandoarrastia)

    Hi Tobias. Thanks for the reply.

    That code made no difference in the layout. It does appear to be centered on my iPhone, but on desktop it still looks left-aligned. Any other options for me?

    Here’s an annotated screenshot: https://www.screencast.com/t/idh3o9fMjt5

    Thank you,. and sorry for the trouble!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ah, ok. Please try again with

    .tablepress-id-10 td {
      text-align: center;
    }

    then. Note the extra td which targets the actual table cell elements then, instead of just the table element.

    Regards,
    Tobias

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Center Table CSS Not Working?’ is closed to new replies.