• Resolved youssefbou

    (@youssefbou)


    The code below is not working to change the background color of each cell. can you help rectify this problem? Thanks

    .tablepress .odd td {
    background-color: #F1FFEA;
    }

    .tablepress .even td {
    background-color: #29402E;
    }

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter youssefbou

    (@youssefbou)

    when i mean “each cell” i mean each row, they are still the original default color.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    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 youssefbou

    (@youssefbou)

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks! To fix this, please uncheck the “Use DataTables” checkbox on the table’s “Edit” screen. This is interfering here, as it raises a JavaScript error, due to the use of #colspan# in the table. This also influences the CSS classes.
    After unchecking that checkbox, the odd/even CSS should be working again.

    Regards,
    Tobias

    Thread Starter youssefbou

    (@youssefbou)

    thats amazing thank you – 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!

    Thread Starter youssefbou

    (@youssefbou)

    i will definitely rate this can i ask one more question

    when i upload an excel spreadsheet with a column set as date in format 30 April 2021 it loads via table press as 2021-04-30 00:00:00 is there a way i can change the date format?

    thanks Tobias i will defo rate Tablepress its great

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    for that, please save the table to a CSV file and import the CSV file into TablePress. That should give you the correct date value.
    (The Excel importer is still experimental and has problems with such dates at this time.)

    Regards,
    Tobias

    Thread Starter youssefbou

    (@youssefbou)

    Great i will try that,

    One more thing sorry for all these questions Tobias, i promise this is my last one, The font color is changing – the code is below it still stays the default color?

    .tablepress .odd td {
    background-color: #F1FFEA;
    color: #29402E;
    }

    .tablepress .even td {
    background-color: #29402E;
    color: #F1FFEA;

    Thanks for everything you have created such a helpful table, its the best one out there by far, you have done a great job

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    that’s caused by other CSS in your theme. Please try adding the !important flag, like

    color: #29402E !important;
    

    Regards,
    Tobias

    Thread Starter youssefbou

    (@youssefbou)

    thats great wonderful thanks for everything 🙂

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    sure, always happy to help!

    Best wishes,
    Tobias

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

The topic ‘CSS Code not working – odd/even colour change’ is closed to new replies.