• Resolved jessiecassidy

    (@jessiecassidy)


    Hello,

    I have entered the following CSS to change the alternating colours in a table:

    .my-extra-css-class .odd td {
    background-color: #d6c7b0 !important;
    }

    .my-extra-css-class .even td {
    background-color: #c4b7a2 !important;
    }

    However, this has not changed the colours. Could you advise on the best CSS to modify the odd and even colours?

    Many thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This would only work if you add my-extra-css-class as an “Extra CSS class” on the table’s “Edit” screen. This would for example make sense if you want to change this on some but not all tables of your site. In the latter case, I recommend to use

    .tablepress .odd td {
      background-color: #d6c7b0 !important;
    }
    
    .tablepress .even td {
      background-color: #c4b7a2 !important;
    }

    Regards,
    Tobias

    Thread Starter jessiecassidy

    (@jessiecassidy)

    Thank you Tobias, that works perfectly now.

    Wonderful support.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Alternating Colors’ is closed to new replies.