• Resolved simsworldit

    (@simsworldit)


    Hi Tobias,

    It’s the first time I create a table with a small width and when I checked the result I found it aligned to left.

    I went in the CSS text-field and added the following code:

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

    The problem is that it doesn’t work. I want the table to be displayed in the center of the page with its original width. (I think it’s 496px)

    I read somewhere I have to apply those properties in the table wrapper but I don’t know the correct CSS selector.

    Can you help me? Thanks in advance and sorry for my english. ^^

    https://ww.wp.xz.cn/plugins/tablepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Are you using the DataTables JS features with this table? If so, please try this “Custom CSS”:

    #tablepress-40_wrapper {
      width: 400px;
      margin: 0 auto 1em;
    }

    Regards,
    Tobias

    Thread Starter simsworldit

    (@simsworldit)

    Thank you very much! It worked!

    Have a good day! 😀

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Centering a table’ is closed to new replies.