Padding on all td except rows with certain class name
This is more like a pure css question where the solution might not need any JQuery.
I need to set padding on all table td except td within rows with certain class name.
For example:
- <table border="1">
- <tr class="no-padding">
- <td>Row 1 with NO padding</td>
- <td>Row 1 with NO padding</td>
- <td>Row 1 with NO padding</td>
- </tr>
- <tr>
- <td>Row 2 with padding</td>
- <td>Row 2 with padding</td>
- <td>Row 2 with padding</td>
- </tr>
- <tr>
- <td>Row 3 with padding</td>
- <td>Row 3 with padding</td>
- <td>Row 3 with padding</td>
- </tr>
- </table>
Css:
- table td{
- padding:10px;
- }
Is there a way to do an exception for all td within rows with class name "no-padding"?