I am creating a newsletter template using foundation. Within the table, there are 2 <th>
elements containing the content "Reservationnumber" and "23425-FF3234". I have multiple instances of these <th>
. I want to apply a colored font to them. While I can achieve this by adding the class class="reservation__fontcolor"
to each <strong>
and <th>
tag individually, applying it to the surrounding table does not work.
Is there a way to set the class="reservation__fontcolor"
on a broader scale so that I don't have to repeat it 60 times?
In the provided code snippet, I attempted to set the
<th class="small-6 large-6 columns first reservation__fontcolor">
on the <th>
tag that includes the <td>
element. However, this approach was unsuccessful. Why is that?
CSS
.reservation__fontcolor {
color: red;
}
HTML
<table align="center" class="wrapper header float-center bgcolor">
<tbody>
<tr>
<td class="wrapper-inner">
<table align="center" class="container" style="background-color:transparent">
<tbody>
<tr>
<td>
<!-- Reservationnumber -->
<table class="row collapse">
<tbody>
<tr>
<th class="small-6 large-6 columns first reservation__fontcolor">
<table>
<tbody>
<tr>
<th>
<strong>Reservationnumber:</strong>
</th>
</tr>
</tbody>
</table>
</th>
<th class="small-6 large-6 columns last">
<table>
<tbody>
<tr>
<th>
23425-FF3234
</th>
<th class="expander"></th>
</tr>
</tbody>
</table>
</th>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>