• Resolved jjj123

    (@jjj123)


    I have tried changing the font color of the table cells to white as I have a green background but having tried various css styles which have not worked, I wondered if it is because each table cell has a link to another page – could the css for the link be overriding it?

    The page is https://dragonflyphotofavourites.co.uk/dragonflies-species-menu/

    This is the css I have added;

    .tablepress-id-2 tbody td {
    font-weight: bold;
    color: #ffffff !important;
    background-color: #1f290a !important;
    }

    .tablepress-id-2 tbody td a {
    color: #ffffff !important;
    }

    .tablepress-id-2 .row-hover tr:hover td {
    background-color: #40492f !important;
    color: #ffffff !important;
    }

    https://www.ads-software.com/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The reason for this is that your theme is adding its own color for the links in a very strict way, so that its CSS takes precedence of your “Custom CSS”. To fix that, we’ll have to make your “Custom CSS” more strict again:

    #main .tablepress-id-2 tbody td {
      font-weight: bold;
      color: #ffffff !important;
      background-color: #1f290a !important;
    }
    
    #main .tablepress-id-2 tbody td a {
      color: #ffffff !important;
    }

    Note the prepended #main, which is the HTML ID of the page’s main element in your theme.
    Also, instead of changing the background color for the hovered rows, just turn that feature off by unchecking the “Row Highlighting” checkbox on the table’s “Edit” screen.

    Regards,
    Tobias

    Thread Starter jjj123

    (@jjj123)

    Thank you so much for your quick response and advice – it worked a treat ??

    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 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add background color to table cells which have links in’ is closed to new replies.