Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter sheritaber

    (@sheritaber)

    Here’s what I’ve figured out… but still don’t have color in the background of the row 1 cells: https://hrtoolkitsonline.com/plans-and-pricing/

    }

    .tablepress-id-4 .row-1 .column-a {
    background-color: #000 !important;
    }

    .tablepress-id-4 .row-1 .column-b {
    background-color: #01A9DB !important;
    }

    .tablepress-id-4 .row-1 .column-c {
    background-color: #01A9DB !important;
    }

    .tablepress-id-4 .row-1 .column-d {
    background-color: #01A9DB !important;
    }

    .tablepress-id-4 .row-1 .column-e {
    background-color: #01A9DB !important;
    }

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Sheri,

    thanks for the question.

    The best way to achieve that is this “Custom CSS” code:

    .tablepress-id-123 thead th {
      background-color: #ff0000;
    }
    .tablepress-id-123 thead .column-1 {
      background-color: #00ff00;
    }
    
    .tablepress-id-123 tbody td {
      background-color: #0000ff;
    }
    .tablepress-id-123 tbody .column-1 {
      background-color: #ffff00;
    }

    Just adjust the table ID and colors as necessary.

    To then also change the color of an intermediate row, you would use

    .tablepress-id-123 tbody .row-5 {
      background-color: #00ffff;
    }

    Regards,
    Tobias

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ah, you meanwhile found some code as well ??
    Just one small thing: Instead of using letters for the columns, you’ll need to use numbers there as well. Also the !important keyword should not be necessary, and you can simplify the code a little bit as in my example. That way, you don’t have to add each column individually.

    Regards,
    Tobias

    Thread Starter sheritaber

    (@sheritaber)

    It worked! Thank you so much!!!

    Sheri Taber

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Sheri,

    no problem, you are very welcome!
    Always happy when I can help!

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Background color in specific cell’ is closed to new replies.