Is there a way to avoid applying certain styles to a table when the screen size is small without having to introduce new CSS properties?
I want to exclude specific tables from inheriting certain styles that are applied globally.
Any suggestions on how I can target all tables except for one in particular? Maybe using a unique identifier?
Thank you in advance
table {
width: 100%;
border-collapse: collapse;
margin: 0px;
}
td,
th {
padding: 10px;
border: 1px solid #ccc;
text-align: left;
font-size: 15px;
}
<table>
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Job Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>James</td>
<td>Matman</td>
<td>Chief Sandwich Eater</td>
</tr>
<tr>
<td>Andor</td>
<td>Nagy</td>
<td>Designer</td>
</tr>
<tr>
<td>Tamas</td>
<td>Biro</td>
<td>Game Tester</td>
</tr>
</tbody>
</table>