私が作成しているテーブルでは、th
とtd
を私が与えている高さにすることはできません。私のコードで見ることができるように、2つのフィールドとth
がテーブル全体の高さを満たすように見えます。THとTDの高さが設定されていない
td
とth
を80px
と60px
に設定するにはどうすればいいですか?
#staff-table {
width: 100%;
height: 600px;
border: 1px solid #CDCDCD;
}
th, td {
color: 303030;
padding: 10px;
}
th {
font-family: 'Source Sans Pro', sans-serif;
font-size: 1.2em;
font-weight: 600;
height: 80px;
background: #F7F7F7;
}
th:hover {
background: #F7F7F7;
}
tr {
border-bottom: 1px solid #EBEBEB;
transition:.5s; -webkit-transition:.5s;
}
tr:hover {
background: #09afdf;/*rgba(9, 175, 223, .4);*/
transition:.5s; -webkit-transition:.5s;
}
td {
font-size: 1em;
font-family: 'Lato', sans-serif;
height: 60px;
}
<table id="staff-table">
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Print Name</th>
<th>Type</th>
<th>Balance</th>
</tr>
<tr>
<td>Georg</td>
<td>Reese</td>
<td>George Reese</td>
<td>Primary</td>
<td>32</td>
</tr>
<tr>
<td>Bob</td>
<td>Synder</td>
<td>Bob Snyder</td>
<td>Sales</td>
<td>10</td>
</tr>
</table>
は、テーブル自体に高さを定義するためにとにかくあり、そのデータはそれにない場合、テーブルはまだ示して? – Paul
@Paulはい...テーブルの「min-height」で答えが更新されました – LGSon
助けてくれてありがとう! – Paul