As Alex wrote, I would define css for the table itself. But there are no nested brackets in the css definition, for example: table.custom_class {... td, th {...} }.
<table class="custom_class"> <tr> <th>First name</th> <th>Last name</th> </tr> <tr> <td>Giovanni</td> <td>Rovelli</td> </tr> <tr> <td>Roland</td> <td>Mendel</td> </tr> </table>
You can use the following CSS example:
table.custom_class { border:solid 5px #006CFF; margin:0px; padding:0px; border-spacing:0px; border-collapse:collapse; line-height:22px; font-size:13px; font-family:Arial, Verdana, Tahoma, Helvetica, sans-serif; font-weight:400; text-decoration:none; color:#0018ff; white-space:pre-wrap; } table.custom_class th { padding: 20px; background-color:#98dcff; border:solid 2px #006CFF; } table.custom_class td { padding: 20px; border:solid 1px #006CFF; } table.custom_class tr { margin:0; padding:4px; }
You can see it in action https://jsfiddle.net/16L9h2ft/
source share