私はファンタジーのニュースレターテンプレートを作っています。次の表は、内容が "Reservationnumber"と "23425-FF3234"の2 <th>
で構成されています。私はこれらのうち約60を持っています<th>
。私はフォントに色をつけたいと思います。各<strong>
タグと<th>
タグにクラスclass="reservation__fontcolor"
を設定すると、私はその作業を行うことができます。しかし、それを<th>
タグを囲むテーブルにセットすると、うまくいきません。CSSと表のフォントの色
class="reservation__fontcolor"
をグローバルレベルに設定する方法はありますか?クラスタグを60回コピー/ペーストする必要はありませんか?
次のコードでは、タグを両方含む<th>
タグに<th class="small-6 large-6 columns first reservation__fontcolor">
を設定しようとしました。しかし、それは動作していません。どうして?
CSS
.reservation__fontcolor {
color: red;
}
あなたがあなたのテーブルにクラスreservation__fontcolorを追加して、あなたのCSSでこれを追加することができます
<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>
質問** **好ましく中[**スタックスニペット**](https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/)。[**最小限で完全で検証可能なサンプルの作成方法**](http://stackoverflow.com/help/mcve) –
コードはこれより短くすることはできません。別のテーブルの中に3つのテーブルがあることがわかります。 – McDuck4