WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] [plugin: wp-table-reloaded] Font color css not working (3 posts)

  1. emmsee
    Member
    Posted 3 years ago #

    Hi Tobias,
    You kindly pointed me to your faq's [http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/faq/] to solve a problem I had wherein I wanted to color different rows fonts a particular color, using CSS - check the table here: http://adventuresportnq.info/events/calendar .

    This is the code I inserted, just for one color font:
    .wp-table-reloaded-id-92 .row-2 td {
    color: #0000FF;

    .wp-table-reloaded-id-92 .row-11 td {
    color: #0000FF;

    .wp-table-reloaded-id-92 .row-13 td {
    color: #0000FF;

    .wp-table-reloaded-id-92 .row-17 td {
    color: #0000FF;

    First, I tried putting them in one statement with comma's and/or semi colon's separating each row number but that didn't work so I then wrote a separate statement for each row of that color - blue[as above] . Only row 2 font colored blue.
    I also tried the code with "!important;" in or deleted - both had the same effect
    I have another 12 rows [non consecutive] in which I want to color the font other colors - 3 colors x 4 rows each font color [none consecutive].

    What am I doing wrong in my CSS coding, do you know?
    also can I use color names [orange, blue etc] rather than hex codes in my css statements?

    regards
    Mike Coleman
    Cairns, Australia

  2. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Mike,

    your code is almost correct, however, for each command you forgot the closing bracket }. (Therefore, only the first command worked, but the next ones were broken due to the missing } in the first command.)

    So, a single command from your code above will look like this:

    .wp-table-reloaded-id-92 .row-2 td {
      color: #0000FF;
    }

    To have everything together as one command, combine them to this:

    .wp-table-reloaded-id-92 .row-2 td,
    .wp-table-reloaded-id-92 .row-11 td,
    .wp-table-reloaded-id-92 .row-13 td,
    .wp-table-reloaded-id-92 .row-17 td {
      color: #0000FF;
    }

    For the color names: The most common names (blue, red, green, and maybe a few more) should work, but hex codes should be the safer way (due to browser support).

    Best wishes,
    Tobias

  3. emmsee
    Member
    Posted 3 years ago #

    Thanks Tobias,
    Worked perfectly!
    regards
    Mike

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic