私はブートストラップホバーテーブルを持っていて、私は<th align="center">
を使用して列ヘッダーを中央に揃えようとしています。これはテーブルには何の影響もないようですが、<td align="center">
が正しく動作します。<th align = "center">ブートストラップテーブルでは動作しません。理由は何でしょうか?
これは私のコードです:
<table class="table table-hover">
<thead>
<tr>
<th>Title</th>
<th>Score</th>
<th align="center">Product</th> #This line is not working
<th>Who Reviewed</th>
<th>When</th>
</tr>
</thead>
<tbody>
{% for review in object_list %}
<tr>
<td><a href="{% url 'backend_reviews_edit' review.pk %}">{{review.title}}</a></td>
<td align="center">{{ review.score }}</td>
<td align="center">{{ review.product.title }}</td>
<td>{{ review.reviewer_name}}</td>
<td>{{ review.date_created|date:"m-d-Y" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
アライメントがCSS、HTMLないで処理する必要があります。 –