• Resolved Mordechaj

    (@mordechaj)


    I have a problem with css, the font color in the tables is not changing. It’s still black even though I added the css code:

    .tablepress-id-N tbody td {
    font-family: Tahoma;
    font-size: 14px;
    font-weight: bold;
    color: #cfad66;
    }

    This happened after plugin update (I don’t know which version exactly) Before the css for the font was working.

    It seems that the table css in wordpress is overriding the font color from the plugin.?

    Below is the entire css code added to the plugin:

    .tablepress thead th,
    .tablepress tfoot th {
    background-color: #d08000;
    } .tablepress tr,
    .tablepress tbody td,
    .tablepress thead th,
    .tablepress tfoot th {
    text-align: center;
    vertical-align: middle;
    } .tablepress thead .sorting_asc,
    .tablepress thead .sorting_desc,
    .tablepress thead .sorting:hover {
    background-color: #44341c;
    } .tablepress .odd td {
    background-color: #44341c;
    } .tablepress .even td {
    background-color: #44341c;
    } .tablepress .row-hover tr:hover td {
    background-color: #cfad66;
    } .tablepress-id-N tbody td {
    font-family: Tahoma;
    font-size: 14px;
    font-weight: bold;
    color: #cfad66;
    } .tablepress tr,
    .tablepress tbody td,
    .tablepress thead th,
    .tablepress tfoot th {
    border-color: #d08000;
    }
    • This topic was modified 1 year, 10 months ago by Mordechaj.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The CSS selector .tablepress-id-N tbody td { is not complete here (see https://tablepress.org/faq/change-font-family-size-color/). You will either need to change the N to a table ID, or if you want to have this applied to all TablePress tables, use .tablepress tbody td {

    Regards,
    Tobias

    Thread Starter Mordechaj

    (@mordechaj)

    Thanks, the bold font works, but the font color is still not changed, it’s black and I don’t know why.

    .tablepress tbody td {
    font-family: Tahoma;
    font-size: 14px;
    font-weight: bold;
    color: #cfad66; <—————– color doesn’t work ????
    }

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter Mordechaj

    (@mordechaj)

    There are two tables in the middle of the site:

    https://settlersonlinewiki.eu/

    • This reply was modified 1 year, 10 months ago by Mordechaj.
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks! I would actually recommend that you switch to the more modern CSS approach using variables here. So, please try

    
    .tablepress tr,.tablepress tbody td,.tablepress thead th,.tablepress tfoot th {
        text-align: center;
        vertical-align: middle
    }
    
    
    .tablepress tbody td {
        font-family: Tahoma;
        font-size: 14px;
        font-weight: 700;
    }
    
    .tablepress {
    	--text-color: #cfad66;
    	--border-color: #d08000;
    	--head-text-color: #111111;
    	--head-bg-color: #d08000;
    	--head-active-text-color: #d08000;
    	--head-active-bg-color: #44341c;
    	--odd-bg-color: #44341c;
    	--even-bg-color: #44341c;
    	--hover-text-color: #111111;
    	--hover-bg-color: #cfad66;
    }

    To see what these mean, please go though the different examples at https://tablepress.org/faq/

    Regards,
    Tobias

    Thread Starter Mordechaj

    (@mordechaj)

    Thank you, now everything works properly.

    Plugin Author Tobias B?thge

    (@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 7 replies - 1 through 7 (of 7 total)
  • The topic ‘CSS problem’ is closed to new replies.