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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Unfortunately, this is not super-easy to achieve as TablePress does not have a built-in feature for automatically changing the color of the cell content depending on the content (e.g. positive/negative).

    I could however image a solution based on a TablePress Extension: https://tablepress.org/download/extension/tablepress-cell-highlighting.zip
    (For details and an example, please see the PHP file source code, which has one in the comment at the top.)
    With that, you could first assign green as the standard text color to all cells:

    .tablepress-id-1 td {
      color: #00ff00;
    }

    Then, with the Extension and a modified Shortcode

    [table id=123 highlight="-" /]
    

    we could “search” for the - sign and then use CSS like

    .tablepress-id-1 .highlight- {
      color: #ff0000;
    }

    Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘It is possible create a table like that?’ is closed to new replies.