Is there a way to give a specific table a custom CSS class?
-
I need to restyle a column in a specific table. Specifically, the Phone number column in a table of contacts. (not all tables in my site are lists of contact info, or have a phone number column)
I see that TablePress provides ID=”
tablepress-##
” and class=”tablepress-id-##
” for table selectors (andcolumn-##
for columns). However, I would prefer to not tie css stylings to database IDs and arbitrary columns.Is there a way to give each table (and/or column within a table) a custom css id/class so that stylings can be more agnostic? aka being able to style
.my-custom-tablepress-class > .phone-number-column
rather than.tablepress-5 > .column-2
. I see this option as a better practice for targeting tables and more robust should the table’s ID change or the columns get reordered.Thank you in advance.
- The topic ‘Is there a way to give a specific table a custom CSS class?’ is closed to new replies.