Answer the question
In order to leave comments, you need to log in
How to set padding for thead?
Basically there is a table like this:
<table class="table_scores">
<thead>
<tr>
<th>Id</th>
<th>Id пользователя</th>
<th>Оценка кода</th>
<th>Оценка геймплея</th>
<th>Оценка дизайна</th>
<th>Тур</th>
<th>Сумма балов</th>
<th>Редактирование</th>
<th>Удаление</th>
</tr>
</thead>
<tbody>
<tr v-for="s in scores">
<th></th>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><button type="button">Редактировать</button></td>
<td>
<button type="button">
Удалить
</button>
</td>
</tr>
</tbody>
</table>
.table_scores {
color: white;
text-decoration: none;
min-width: 1080px;
table-layout: fixed;
font-weight: 400;
box-sizing: content-box;
background: transparent;
text-align: center;
td {
padding: 0px 10px;
}
& > thead {
border-top: 1px solid white;
border-bottom: 1px solid white;
}
& > tbody > tr {
border-bottom: 1px solid white;
}
}
.table_edit-button {
background: linear-gradient(270deg, #13e096 0%, rgba(255, 255, 255, 0) 85.78%), #19d97d;
border-radius: 27px;
padding: 5px 10px;
color: white;
font-weight: 600;
margin: 8px 0px;
}
.table_delete-button {
background: linear-gradient(270deg, #ff7b7b 0%, rgba(255, 255, 255, 0) 85.78%), #d91919;
border-radius: 27px;
padding: 5px 10px;
color: white;
font-weight: 600;
}
Answer the question
In order to leave comments, you need to log in
https://www.w3.org/TR/CSS2/box.html#propdef-padding
Padding:
Applies to: all elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question