• Resolved afernandezody

    (@afernandezody)


    Hello,
    I’m trying to change the font and background colors, but the response is hard to understand. For the body, I have the following CSS:

    .tablepress-id-1 tbody td {
    	font-family: Verdana;
    	font-size: 16px;
    	color: #ff0000;
    	background-color: #00ff00;
    }

    This picks up the font type/size but completely ignores the colors. I also tried a different approach (based on some other post):

    .tablepress-id-1 tbody td {
    	font-family: Verdana;
    	font-size: 16px;
    }
    tablepress-id-1 .row-2 td {
    	color: #ff0000;
    	background: #00ff00;
    }
    tablepress-id-1 .row-4 td {
    	color: #ff0000;
    	background: #00ff00;
    }

    But this didn’t change the outcome.
    The response for the header is even more head scratching:

    .tablepress thead th,
    .tablepress tfoot th {
    	font-size: 20px;
    	background-color: #ff0910;
    	color: #ffffff;
    }

    This actually works when I insert it on the page and open it with Elementor. However, when I publish it, the header shows in the usual color.
    I was wondering if anyone has any suggestion on what I am missing and which would be the best way to proceed.
    Thanks.

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

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    When I check your link, I do see the correct header colors (white text on red background). Can you please check that again (in a browser/tab where you are not logged-in into WordPress, to rule out caching issues)?

    The other CSS is not working because the . is missing before tablepress-id-1. Can you please try again after adding that?

    Regards,
    Tobias

    Thread Starter afernandezody

    (@afernandezody)

    Hi Tobias,

    I’m using 2 different browsers: one for editing and one for browsing/checking. The thing is that I must clear the cache and history of the latter every time I make any modification to the CSS. As far as the CSS code, I cannot assign colors to the entire body (or even to odd/even rows) but line-by-line it seems to be mostly working so I might be able to use this workaround (as the table is very small).

    Thanks.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    TablePress uses a “cache busting” URL parameter for its CSS files, so any necessary manual cache clearing is caused by other things (caching plugins, weird browser caching, …). I recommend to test such things in an “Incognito”/”Private browsing” tab, as these don’t use browser caching.

    As for the other color changes: That first snippet is not working because you are using the alternating row colors feature. You will then need https://tablepress.org/faq/change-color-alternating-rows/

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cannot modify (background) colors’ is closed to new replies.