• Resolved jx2900

    (@jx2900)


    Hi, I love TablePress and using it a lot.

    There are some cases that I would like to draw diagonal cross lines in table press.
    I would like to set class=”diagonalCross” to td and sometimes to th. How can I do that for TablePress?

    I would appreciate if anyone could help me.

    I’m going to use CodePen’s example to draw diagonal cross lines.

    .diagonalCross2 {
      background: linear-gradient(to top right, #fff calc(50% - 1px), black , #fff calc(50% + 1px) )
    }
    

    Best regards,
    Junji

    • This topic was modified 2 years, 8 months ago by jx2900.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jx2900

    (@jx2900)

    I know that I can choose a cell .column-# .row-# one by one and set the CSS per table.
    But I would like to set the css as global across all my tables on all my pages.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Giving individual CSS classes to table cells is not directly possible at this time. You would always have to manually specify the row number and column number somewhere, either in the CSS or in some PHP code.

    For how many cells per table would you want to add this CSS class? And is it always the same cell (like the top left one)?

    Regards,
    Tobias

    Thread Starter jx2900

    (@jx2900)

    Hi Tobias,
    Thank you for your reply.
    Okay, I will specify cells one by one then.

    I sometimes need to compare n:n factors, where the same row and column are comparing same factor themselves. So I would like to slash the cell out by diagonal line. The number of the “n” might vary by what I want to compare. But I don’t expect the maximum number of n exceed 6.

    Since I am using WordPress. So I will put the CSS at the bottom of the editor area by specifying .row-# .column-#.

    Thank you again. At least, I know for sure that it is not possible at this moment.

    Best regards,
    Junji

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, that should be the best option for now. Sorry for not having better news here.

    Best wishes,
    Tobias

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Creating my own class for cell’ is closed to new replies.