WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Changing Row Colors (5 posts)

  1. ccwadsworth
    Member
    Posted 3 years ago #

    Hello - I am having another issue with row colors.

    I have inserted the following with no luck:

    .wp-table-reloaded-id-2 .row-2 td {background-color: #fafff6!important;}
    .wp-table-reloaded-id-2 .row-3 td {background-color: #fafff6!important;}
    .wp-table-reloaded-id-2 .row-4 td {background-color: #fafff6!important;}

    I have de-selected the option so that every second row has a different background color, but no colors appear in these rows.

    any suggestions?

  2. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    please provide the URL of the page with the table, so that I can check for any conflicts with other CSS code.

    Best wishes,
    Tobias

  3. ccwadsworth
    Member
    Posted 3 years ago #

  4. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    thanks for the link.

    This is what I found: The problem does not arise from a conflict, but from a minor typo in the CSS code before the one from above.

    You have the code

    .wp-table-reloaded-id-2 .column-1 {
      width: 120px;
    .column-2 {
      width: 100px;
    .column-3 {
      width: 100px;
    .column-4 {
      width: 50px;
    }

    where there's a } after the commands for the width of the columns. (Because of that, all following CSS commands fail.) Also, you left out the first part of the CSS selector, which is not recommended. (Due to that, the column widths would be applied to all tables, instead of just those of table 2. If you want them to be applied to all tables, use the global .wp-table-reloaded selector instead.)
    So, in short, please replace the code from above with

    .wp-table-reloaded-id-2 .column-1 {
      width: 120px;
    }
    .wp-table-reloaded-id-2 .column-2 {
      width: 100px;
    }
    .wp-table-reloaded-id-2 .column-3 {
      width: 100px;
    }
    .wp-table-reloaded-id-2 .column-4 {
      width: 50px;
    }

    Best wishes,
    Tobias

  5. ccwadsworth
    Member
    Posted 3 years ago #

    outstanding!
    many, many thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic