问题是,我想为每个表行添加两个锚元素,所以我需要为这些链接再添加两个,问题是当我添加它们时,边框会出现在顶部,即使我设置了
<th style="display:none;"></th>
这是表代码
.tablesgh table{
width: 80%;
margin:auto;
/* align-self: center; */
}<div class="tablesgh">
<table style="border-collapse: collapse;" class="table text-center table-responsive table-success table-hover table-bordered table-sm">
<thead>
<tr>
<!-- <div class="boldTd"> -->
<th>Nom complet</th>
<th>Num telephone</th>
<th>Lien du profile</th>
<th>Date ajouté</th>
<th style="display:none;"></th>
<th style="display:none;"></th>
<!-- </div> -->
</tr>
</thead>
{% for client in clients %}
<!-- <script>
var cli_name="{{client.name}}";
var cli_id="{{client.id}}";
</script> -->
<tr>
<td>{{client.name}}</td>
<td>{{client.phone}}</td>
<td>{{client.profile_link}}</td>
<td>{{client.date_added}}</td>
<td style="display:none;">{{client.id}}</td>
<td><a style="position:relative;" href="{% url 'delete-record' client.id %}" class="btn btn-outline-danger">Effacer</a></td>
<td><a href="{% url 'get-commandes' client.id %}" class="btn btn-outline-info">Afficher les commandes</a></td>
</tr>
{% endfor %}
</table>
<!-- </div>
</div> -->
</div>
发布于 2022-01-20 12:50:49
你的桌子是table-bordered类的,你可以试着摆脱它。您还可以直接从style属性控制边框外观:例如,如果用border: 0px;替换display:none;,它应该会消失。您还可以使其透明(border-color: transparent;)等。
https://stackoverflow.com/questions/70786348
复制相似问题