We can use attribute selector like that td[colspan]. But I need to use selecting "not colspan". Can you help me?
I tried td[not:colspan] but it is not working. I tried in FrameworkJS but it is not working.
How to select CSS attribute selector?
We can use attribute selector like that td[colspan]. But I need to use selecting "not colspan". Can you help me?
I tried td[not:colspan] but it is not working. I tried in FrameworkJS but it is not working.
How to select CSS attribute selector?
You can use td:not([colspan]) selector in your code.
You were almost there.
td:not([colspan])
td {
border: 1px solid red;
}
td:not([colspan]) {
background: lightblue;
}
<table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
<tr>
<td colspan="2">Sum: $180</td>
</tr>
</table>