• Resolved psamathe

    (@psamathe)


    But only for tables with hidden columns using the +/- system (show/hide). In my case the hidden (show/hide) columns contain images so the page load is a bit slow and, when the page is refreshed, initially the table is shown centred but once the images have downloaded the table jumps to be left aligned.

    I’ve tried

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

    and experimented with

    .tablepress-id-17 {
    	width: auto;
    	margin: 0 auto 1em;
    	align-self: center;
    }

    but they have no effect

    Happens on all similar tables but as some are wider than others it is more obvious on some than others. A good example in the website link associated with this topic.

    Installed Tablepress plugins:
    Tablepress (the main plug-in)
    TablePress Extension: Responsive Tables
    TablePress Extension: Row Details

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

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

    (@psamathe)

    Additional info:
    It seems to relate to shortcode parameters. Shortcode used is
    [table id=3 responsive=scroll datatables_row_details=true datatables_row_details_columns="F-G" /]
    but remove the “responsive=scroll” and the table becomes full width so you can’t tell if it’s centred or not. So might be expected behaviour or not or I’m confused …

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Please add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .dataTables_wrapper .tablepress {
      width: 100% !important;
    }

    Regards,
    Tobias

    Thread Starter psamathe

    (@psamathe)

    Makes the table full width but I was after cantering the “auto” width table.

    (Thanks for reply)

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, this makes it full-width, which however is the best solution here. Auto-width is extremely hard with dynamic content (from the expanding rows with the images).

    Regards,
    Tobias

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