• Resolved Growltiger

    (@growltiger)


    The page has two tables, both with the same problem. I don’t want alternating row colours.

    I have the alternating row colours unticked, but I still get the odd rows grey and the even rows white. I have tried everything I can think of.

    I tried turning the feature on and setting the row colours, as per the documentation. I still could not change the row colours at all:
    .tablepress .odd td {
    background-color: #ff0000;
    }
    .tablepress .even td {
    background-color: #00ff00;
    }

    I tried [table id=2 alternating_row_colors=false /] that didn’t stop them alternating.

    Interestingly if I turn on the Row Hover Highlighting, that feature does work.

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

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The cause for this simply is that your theme is also adding such an effect to all tables on the page. To override that, please add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress tbody td {
    	background-color: #f8f8f8;
    }

    Regards,
    Tobias

    Thread Starter Growltiger

    (@growltiger)

    I did exactly that and sadly nothing changed. I did it to both tables.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    are you sure that you added this to the “Custom CSS” text field on the “Plugin Options” screen? This is NOT on a table’s “Edit” screen!

    Regards,
    Tobias

    Thread Starter Growltiger

    (@growltiger)

    Now I understand. Now it works, many thanks.
    It leads to two more questions.
    1. Can one apply this to just specific tables?
    2. I am now left with a thin grey line between each row. Can I get rid of that?

    Thread Starter Growltiger

    (@growltiger)

    I solved the grey lines by putting this in the theme’s extra CSS:
    .tablepress,
    .tablepress tbody,
    .tablepress tr,
    .tablepress tbody td,
    .tablepress thead th,
    .tablepress tfoot th {
    border: none;
    }

    I still can’t see how to specify specific tables.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    good to hear that it’s working now and that you already found the CSS to remove the border lines!

    To apply a command to just a single table, just use .tablepress-id-123 instead of .tablepress (where 123 is the table ID). The example above, just applied to table 7 would be

    .tablepress-id-7 tbody td {
    	background-color: #f8f8f8;
    }

    Regards,
    Tobias

    Thread Starter Growltiger

    (@growltiger)

    Thank you so much for your help. I now have different types of tables looking different from each other, as I wanted. Everything is working perfectly.

    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 Growltiger

    (@growltiger)

    I gave it 5 stars. Brilliant.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks, I really appreciate that!

    Best wishes,
    Tobias

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Cannot stop alternating row colours’ is closed to new replies.