我真的很新,HTML/CSS
但我需要使用這兩種語言才能實現我的Django Web應用程序。使用CSS/HTML的單元格表格間距
我的<table>
出現問題,因爲單元格間距不考慮我的css文件。
.navbar {
background-color: #0083A2;
}
.nav navbar-brand {
color: #FFFFFF;
}
.active {
background-color: #454545;
}
h1,
h2,
h4 {
color: #0083A2;
}
.button {
display: inline;
margin-left: auto;
margin-right: auto;
border-radius: 8px;
font-size: 16px;
border: 2px solid #000000;
background-color: #e8e8e8;
-webkit-transition-duration: 0.2s;
transition-duration: 0.2s;
}
.form-fields {
border-radius: 8px;
margin-right: auto;
}
.col-sm-6 {
display: inline-block;
margin-left: 10px;
width: 30%;
list-style: None;
}
.col-sm-8 {
list-style: initial;
}
.col-sm-10 {
display: inline-block;
margin-left: 10px;
width: 800%;
list-style: None;
}
.button:hover {
background-color: #0083A2;
color: #454545;
}
table {
border-spacing: 100px;
}
<div class="col-sm-8">
<h4><b><font color="#0083A2"> Récapitulatif des 3 dernières fiches individuelles créées: </b></font></h4>
<table>
<tbody>
<tr>
<th>ID</th>
<th>Civilité</th>
<th>Nom</th>
<th>Prénom</th>
<th>Date de Naissance</th>
<th>Ville de Naissance</th>
<th>Pays de Naissance</th>
</tr>
{% for item in identity %}
<tr>
<td>{{ item.id}}</td>
<td>{{ item.title }}</td>
<td>{{ item.lastname }}</td>
<td>{{ item.firstname }}</td>
<td>{{ item.birthday }}</td>
<td>{{ item.birthcity }}</td>
<td>{{ item.birthcountry }}</td>
</tr>
</tbody>
</table>
</div>
我寫在我的兩個腳本出問題了嗎?如果您有建議,我會很樂意考慮!
謝謝!
編輯:
這是我的表:
間距與您的問題中的代碼一起工作。 – Quentin
@falguni - 是什麼讓你認爲OP正試圖**刪除**間距?他們明確地將其設置爲大量。 – Quentin
@falguni不起作用..'border-spacing'和'border-collapse'對我的html頁面沒有任何影響 – Deadpool