Sticky header, center columns, highlight rows based on value
-
Tobias,
I have read your posts about sticky headers, centering columns and highlighting rows based on cell values but am still not able to get it to work. I downloaded the Tablepress Extension: DataTables FixedHeader and the Tablepress Extension: Row Highlighting as well.
For the sticky header I put this in the shortcode on the page I am creating:
[tableid=1 datatables_fixedheader=top /]
and in the plugin options under custom CSS code I input:
.tablepress.fixedHeader-floating {
z-index: 1000 !important;
}For centering of text in all columns I put this in the custom CSS code under plugin options:
.tablepress thead th,
.tablepress tbody td {
text-align: center;
}For highlighting the cells in blue, I am able to highlight a row by identifying the row number using the code below in the plugin options custom CSS section:
.tablepress-id-1 .row-2 td {
background-color: blue;
}However, I am creating a table that may have over 200 rows. In between sections of rows I will have a blank row of empty cells to break up the data. It is possible that I could insert a new row at some point changing all the row numbers after that new row. Also as the table will have many rows and there will many blank rows of empty cells I was hoping to highlight rows by triggering off the empty cells. So, if the cells are empty then highlight that row in blue. Is there a way to do that? I tried putting the following code into the plugin options section of custom CSS code:
.tablepress-id-1 .row_highlight.empty-cells td {
background-color: blue;
}The above and quite a few other iterations I tried did not work.
Thanks for your help and the nice plugin.
Roger
The page I need help with: [log in to see the link]
- The topic ‘Sticky header, center columns, highlight rows based on value’ is closed to new replies.