• Resolved dalai2017

    (@dalai2017)


    Hello,

    I am still figuring out CSS commands. I am very new to the TablePress plugin. I was wondering if someone could provide the right CSS command to change the background color of an entire table.

    Thank you!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Usually, that would be

    .tablepress-id-123 thead th,
    .tablepress-id-123 tbody td {
      background-color: #ff0000;
    }

    but this may vary depending on e.g. the theme.

    If this does not work, 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 dalai2017

    (@dalai2017)

    Hi Tobias,

    I applied this code, but it was unresponsive. I’m using the Cannyon Premium theme for WordPress. Here is the link to one of the pages: https://dalaigroup.com/maryland-seo/

    I’m using the TablePress plugin to create our client banner below the video. It is a 1×8 table with our client logos inside. I’ve only been able to figure out a CSS code, which applies to one specific table cell:

    .tablepress-id-ClientBanner .row-1 .column-1 {
    background-color: #ffa223;
    }

    This forces me to apply the same code to 8 individual table cells to complete the entire background.

    For this specific table, I have disabled the use of a Header row, so I’m not sure the first line of your code is necessary. I tried your code both ways, and both were unresponsive.

    I’ve also experimented with a code that I hoped would change the color of the entire row, but this was also unresponsive:

    .tablepress-id-ClientBanner .row-1 td {
    background-color: #ffa223;
    }

    I’m puzzled because I know the first line of the code above works for commands like text-align, font-weight, and font-size. However, it won’t yield anything for background color. I feel like I may be missing something very small in the codes I have tried. I am very new to codes. Any recommendations you may have would be a huge help.

    Thank you in advance!

    -Stephanie Hertl

    Thread Starter dalai2017

    (@dalai2017)

    Is there anyone who can help me figure out how to change the entire background color of my table in Table Press? I’m using eight codes to change the color of each individual table cell because I cannot figure out the necessary command to change the table body.

    Thank you.

    Hi Stephanie,

    Since you only have 1 row, you can use this code :

    .tablepress-id-ClientBanner .row-1 td {
    background-color: #ffa223;
    }

    So without specifying the column, it will affect the whole row.

    I hope it helps,
    Nickelle

    Thread Starter dalai2017

    (@dalai2017)

    I must have misspelled something. I tried that code previously, and was unsuccessful.

    How might I be able to center the images used in that row?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    from what I can see, the code is working now?

    Regards,
    Tobias

    Thread Starter dalai2017

    (@dalai2017)

    I was able to change the background color for my client banner with the following code:
    .tablepress-id-ClientBanner .row-1 td {
    background-color: #ffa223;
    }

    I needed to add a text-align command to the first code, in addition to the second code, for the images to be centered in each cell. Like so:

    .tablepress-id-ClientBanner .row-1 td {
    background-color: #ffa223;
    text-align: center;
    }

    .tablepress-id-ClientBanner .row-1 td img {
    float: none;
    }

    Is this the most efficient way to achieve both commands for a 1 x 8 table?
    Here’s the orange banner I’ve created for reference: https://dalaigroup.com/san-diego-seo/

    Thank you!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, that code looks totally fine to me, it’s clean and efficient.

    Regards,
    Tobias

    Thread Starter dalai2017

    (@dalai2017)

    Thank you!

    Plugin Author TobiasBg

    (@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!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Background Color | Entire Table’ is closed to new replies.