Title: CSS Code not working &#8211; odd/even colour change
Last modified: October 25, 2020

---

# CSS Code not working – odd/even colour change

 *  Resolved [youssefbou](https://wordpress.org/support/users/youssefbou/)
 * (@youssefbou)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/)
 * 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](https://wordpress.org/support/users/youssefbou/)
 * (@youssefbou)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13578408)
 * when i mean “each cell” i mean each row, they are still the original default 
   color.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13579998)
 * 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](https://wordpress.org/support/users/youssefbou/)
 * (@youssefbou)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13580578)
 * [http://tinybeads.co.uk/sample-page-2](http://tinybeads.co.uk/sample-page-2)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13580658)
 * 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](https://wordpress.org/support/users/youssefbou/)
 * (@youssefbou)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13580797)
 * thats amazing thank you – worked a treat 🙂
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13580811)
 * 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](https://wordpress.org/support/plugin/tablepress/reviews/#new-post)
   here in the plugin directory. Thanks!
 *  Thread Starter [youssefbou](https://wordpress.org/support/users/youssefbou/)
 * (@youssefbou)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13580839)
 * 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](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13580999)
 * 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](https://wordpress.org/support/users/youssefbou/)
 * (@youssefbou)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13581048)
 * 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](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13581298)
 * 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](https://wordpress.org/support/users/youssefbou/)
 * (@youssefbou)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13581596)
 * thats great wonderful thanks for everything 🙂
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13581774)
 * 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.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/css-code-not-working-odd-even-colour-change/#post-13581774)
 * Status: resolved