Я скопировал код таблицы из Bootstrap и установил для каждой строки свой собственный цвет фона, но между каждой 1 есть пробел, и я не знаю почему.
Я установил все границы, поля и отступы в 0 для всех "tr", "tbody" и "thead".
Вопрос: Что я могу сделать, чтобы предотвратитьпробелы вокруг ячеек таблицы?
#C1{
margin-top: 40px;
width: 75%;
border: 1px solid black;
padding: 0px;
}
.table-red{
background-color: red;
color: #ffffff
}
.table{
margin-bottom: 0px;
padding: 0px;
}
.table-striped tbody tr:nth-of-type(even){
background-color: red;
color: white;
}
.table-striped tbody tr:nth-of-type(odd){
background-color: blue;
color: white;
border: 0;
}
thead{
background-color: green;
border: 0px;
margin-bottom: 0px;
margin-top: 0px;
}
th{
border: 0px;
}
tbody{
margin-top: 0px;
}
<div class="container" id="C1">
<table class="table table-striped">
<thead >
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div>
Пустое пространство должно исчезнуть
![enter image description here](https://i.stack.imgur.com/oTQ8r.jpg)