Change background color for more rows

[ad_1]

Hi!

Thanks for your post and sorry for the trouble!

In the CSS code, the only real way to shorten this would be this structure:

.tablepress-id-1882 .row-8 td,
.tablepress-id-1882 .row-9 td,
.tablepress-id-1882 .row-10 td {
  background-color: #e1ede0;
}

This already shortens the code quite a bit.

Another approach could be to use the Row Highlighting feature module that is part of your site’s TablePress Pro license plan. With that, you could move the designation of which row is to be styled from the CSS to inside the table: You could add a hidden column and enter some keyword into the cells. These rows would then get a CSS class which contains that keyword, so that the CSS code will be much shorter. If you would like more details for this or have any questions, please get in touch via the email address from the “About” screen of TablePress (as I’m not allowed to directly offer support for the premium versions, due to the forums rules).

Best wishes,
Tobias

Thread Starter
Rene W

(@rene-w)

Thanks for the reply! The first option is already a lot better and useful. Though i’m gonna try the highlighting feature. So maybe I will get in contact about that, but i’m gonna try it myself first.

Hi,

cool! Sounds good 🙂
Always happy to help!

Best wishes,
Tobias

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer