WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [wp-table-reloaded] Multiple background colors?

[Resolved] [wp-table-reloaded] Multiple background colors?

  • Hi, great plugin but I’m wondering if it’s possible to change the background table of individual tables within the table properties rather than change it in the CSS which changes it for all tables?

    I’ve tried exporting a table, adding bgcolor=”#999999″ within the opening table tag but got errors importing it. Then tried adding the colour as a background image but again got errors importing it, both with and without the table tags. In fact I tried exporting a table using all 3 methods and then tried importing it again without making any changes but again got errors so am not sure if I’m missing something?

    Anyway, is it possible to add individual background colors using this technique or any other?

    Many thanks,
    Benz1

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    changing table background colors is only possible with CSS so far.
    And of course it is possible to change it on a per-table basis (meaning that CSS does not necessarily change it for all tables!)

    You just have to use different CSS selectors (see http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/documentation/#css for an overview):

    There is .wp-table-reloaded which indeed affects all tables.
    Then there is .wp-table-reloaded-id-XY which will only affect the table with ID XY.

    So, for different background colors, say for the tables 3 and 5, you could use this CSS:
    .wp-table-reloaded-id-3 {background-color: red;}
    .wp-table-reloaded-id-5 {background-color: blue;}

    (Of course you have to make sure that there are no other CSS commands overwriting the color again, e.g. those for certain rows or cells.)

    Hope this helps!
    Tobias

    Great, that should do the trick! Thanks for the comprehensive answer Tobias.

    Benz1

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [wp-table-reloaded] Multiple background colors?’ is closed to new replies.