I have the following table:
<table id="test">
<tr>
<td>test</td>
<td>test</td>
<td>test</td>
</tr>
<tr>
<td>test</td>
<td>test</td>
<td>test</td>
</tr>
</table>
I need to hide third element td
using CSS.
As the result I need something like the following HTML:
<table id="test">
<tr>
<td>test</td>
<td>test</td>
</tr>
<tr>
<td>test</td>
<td>test</td>
</tr>
</table>
How can I hide the third td
in every row?
In tag element not add class or id - need to hide using only CSS.
Try this:
#test tr td:nth-child(3n+3) {
display: none;
}
Check this fiddle
#test tr td:nth-child(3) { display:none; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With