Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Most likely, you’ll just have to remove the margin around the images, with some “Custom CSS” (on the “Plugin Options” screen of TablePress) like

    .tablepress img {
      margin: 0 !important;
    }

    Unfortunately, I could not verify this, as the link above only asks me for a password. If the CSS suggestion is not working, please send me that by email (the address is in the main plugin file “tablepress.php”) so that I can take a look.

    Regards,
    Tobias

    Thread Starter einstein green

    (@einstein-green)

    thanks!
    I changed the margin but did not take effect.

    also – in that same table, the “‘length” column sorts like this: 1,10,11,12…2,20 instead of 1,2,3… I see on the demo that the colomn “points” sorts correctly – how do I get my table to do that? thanks for your help

    Thread Starter einstein green

    (@einstein-green)

    I sent you login my email.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for that!

    My assumption here is that this is related to the vertical scrolling in the table. That requires the JS to fix some of the column widths automatically. Can you maybe turn that off for a quick test?

    The sorting is not working because that “Length” column does not actually contain numbers. It contains text strings and those are sorted differently, thus the apparent results seems to be wrong.
    We could try to tell the JS sorting library that it should sort this column as numbers. For that, please try adding this to the “Custom Commands” textfield on the “Edit” screen of the table:

    "columnDefs": [ { "type": "num-fmt", "targets": 2 } ]

    This changes the data type in the third column (indicated by the 2, as counting starts with 0).

    Regards,
    Tobias

    Thread Starter einstein green

    (@einstein-green)

    I added that but now the column does not sort at all.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ok, then we might have to fall back to the DataTables Sorting Plugins Extension from https://tablepress.org/extensions/datatables-sorting-plugins/ Please install and activate that and then change the code from above to

    "columnDefs": [ { "type": "formatted-num", "targets": 2 } ]

    Regards,
    Tobias

    Thread Starter einstein green

    (@einstein-green)

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    all set here or did your post just not make it through? ??

    Regards,
    Tobias

    Thread Starter einstein green

    (@einstein-green)

    sorry – I am having issues with the size of the images on the big table at the bottom of this page. The images are 80×80, set to be centered. I tried this css:

    .tablepress-id-63 tbody .column-0 {
    height: 80px;
    width: 80px;
    padding: 8px;
    vertical-align: middle;
    text-align: center;
    }
    but the first column is still too wide.
    In the top table (colombia) there is still an extra padding or margin on the right side of the images – so they do not look centered.

    https://andes-world-travel.flywheelsites.com/culture-nature/

    can you help me figure this out? thanks.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for the clarification!

    You are targetting .column-0, which does not exist. In CSS, counting starts with 1.
    So, this should actually be enough here:

    .tablepress-id-63 tbody .column-1 {
      width: 80px;
    }

    Unfortunately, I have no clue why this approach is not working in the other tables ??
    How about removing the vertical borders to make this less visible?

    Regards,
    Tobias

    Thread Starter einstein green

    (@einstein-green)

    That worked thanks.
    Is it only in the sorting that you start with column 0?
    If I wanted to remove the vertical borders, how would I do that – also for all the tables?

    Thread Starter einstein green

    (@einstein-green)

    I am also working with this sorting code on several tables. Do I count the table numbers starting with 0, and including the columns I have hidden? I am getting an error on that page now that I am using the wrong code on table 64 (the first one). I want to sort the length column which is E but C and D are hidden. ??

    Thread Starter einstein green

    (@einstein-green)

    I am having trouble seeing the top table at all – even though it’s the same as the one below with a different shortcode. And the big table at the bottom is not sorting at all now. ??

    Thread Starter einstein green

    (@einstein-green)

    The big table is fine but the others are not displaying now – they are all variations of table 64.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    for your first question: Yes, the counting only starts with 0 in the “Custom Commands” textfield for the sorting. In pretty much all other places (CSS, Shortcode parameters, …) counting starts with 0. Also, in the “Custom Commands”, you have to take all columns into account that are not hidden on the “Edit” screen (i.e. do not have a red background there).

    For the problem with tables not displaying: I’m not sure what could be causing this, as your link now only gives a “404 Not found” error for me ??

    Regards,
    Tobias

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Sizing images’ is closed to new replies.