I have a table where some rows are collapsed with hidden rows that show more information about its "parent" row. For readability, I want to use table striping on each row.
The issues lies with the table striping being applied to the hidden rows, and messing up the striping.
The collapsed rows show more information about the row that was originally clicked, so my goal is to have the rows that are accordioned down be the same color as the "parent" row.
I am building the table striping in CSS using:
tr:nth-child(even)
{
background-color: white;
}
and I want to inherit the back-ground color when:
tr[aria-expanded="true"]
{
background-color: white;
}
tr[aria-expanded="false"] tr:nth-child(even)
{
background-color: inherit;
}
I have tried this with no luck:
tr[aria-expanded="true"] tr:nth-child(even)
{
background-color: inherit;
}
tr[aria-expanded="false"] tr:nth-child(even)
{
background-color: inherit;
}
This is the HTML for the "parent" row:
<tr data-toggle="collapse" data-target=".lineItem14"><td class="workQueueTable" id="lineItemId">Search - Judgments</td></tr>
Add here is the related hidden row:
<tr class="lineItem14 collapse" aria-expanded="false" style="height: 0px;"><td class="workQueueTable"> <b>Address: </b> /td></tr>
Any thoughts on how to proceed?