Adding CSS to TablePress to Modify Text Attributes
-
Hi, all-
Using TablePress, I am trying to set up a table to display a series of data entries consisting of 2 rows each.
I am trying to do the following:
a) Bold the text on the ODD rows.
b) Add a little space to the bottom of each EVEN row.
c) Create a row span on ODD rows to accommodate a longer entry.Adding this code to my table works to bold the ODD rows:
.tablepress-id-1 .row-1, .row-3, .row-5 { font-weight: bold; }Adding this code to my table turns the borders off and affects the spacing on ALL rows (not just EVEN rows):
.tablepress-id-1, .tablepress-id-1 tr, .tablepress-id-1 tbody td, .tablepress-id-1 thead th, .tablepress-id-1 tfoot th { border: none; padding-top: 18px; }The code listed above is all based on examples from the TablePress website.
So, to my questions:
1. Is a table the right approach for what I want to do? I’m envisioning having up to 2 or 3 thousand entries in my table.2. Is there a better way to specify all the ODD rows than what I am doing in my first example, specifying each ODD row individually? Is there a reserved word that will let me specify all ODD rows with only one line?
3. How can I adjust the padding or margin on just the EVEN rows? I tried adjusting the padding & margins by adding the code from my second example to my first example, but it doesn’t work. I also tried specifying row numbers in my second example, using the same format shown in my first example, but it doesn’t work.
I’m guessing there is a simple solution, but it’s beyond my ken.
Best,
Chris
The topic ‘Adding CSS to TablePress to Modify Text Attributes’ is closed to new replies.