- I want to apply a style using Class (preferably but not mandatory) on a prev. cell from the current cell.
- Based on below example, I want to hide the checkbox1 (in first column) if the Type equals TypeName-1
- Coding Restrictions,
3.1) I can only apply CSS on any column except the first one (checkbox)column.
So based on the above restriction I need a way to apply CSS on NAME column AND it should reflect on the hide the checkbox in the previous cell or first cell!
| Check All | Name | Type |
|---|---|---|
| checkbox 1 | Name 1 | TypeName-1 |
| checkbox 2 | Name 2 | TypeName-2 |
I tried,
[1] tbody>tr>:nth-child(cellnumber) but it does not work since the none of the elements (tbody, tr) are found in the td cell, where the css is getting applied.
[2] Just using :nth-child(1) applies to current cell, and using -ve number won't apply to previous cell.