• Resolved brozina

    (@brozina)


    Hi!

    I tried to change the colors of the first row and the first column of a table:

    .tablepress-id-1 .row-1 td {
    background-color: #455f20;
    color: #fefac9;
    font-weight: bold;
    }

    .tablepress-id-1 .column-1 td {
    background-color: #455f20 !important;
    color: #fefac9 !important;
    font-weight: bold !important;
    }

    The change of the row works fine, but the code has NO effect on the first column… Even the “!important” didn’t help. Only the first cell changed, because it’s in row-1.

    Do you have an idea?

    Thanks!

    Benjamin

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

Viewing 1 replies (of 1 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    To achieve this, you’d need to use

    .tablepress-id-1 td.column-1 {
    

    instead of

    .tablepress-id-1 .column-1 td {
    

    in the CSS. Could you please try that?

    The reason for this is that the column-1 CSS class is a child class of the td HTML element (which resembles the table cell), whereas row-1 is a CSS class of the cell’s container element (tr, which resembles the table row).

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘change of column color’ is closed to new replies.