table
はですが空でもすべてのセルが同じ幅になるようにしたいので最初のセルを広くしてテキストが収まるようにしますどのようにこの作品を作るためのアイデア?最初のセルの幅が広い表
HTML
<div class="prTableContainerScroll">
<table id="squatTable" class="prTable">
<tr class="prTableHeader">
<th></th>
<th></th>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
</tr>
<tr class="prTableRow">
<td class="prExerVariNameTD blackColor">Wider to fit</td>
<td class="prVerticalSpace"></td> <!-- Space -->
<td class="prTableCell" title="@finalDate">50</td>
<td class="prTableCell">60</td>
<td class="prTableCell"></td>
<td class="prTableCell">80</td>
<td class="prTableCell"></td>
</tr>
<tr class="prTableRow">
<td class="prExerVariNameTD blackColor">Wider to fit 1</td>
<td class="prVerticalSpace"></td> <!-- Space -->
<td class="prTableCell" title="@finalDate">50</td>
<td class="prTableCell"></td>
<td class="prTableCell">70</td>
<td class="prTableCell">80</td>
<td class="prTableCell"></td>
</tr>
</table>
</div>
CSS
.prTableContainerScroll {
width: auto;
overflow-x: auto;
white-space: nowrap;
}
.prTable {
table-layout:fixed;
width: 400px;
}
.prTableCell {
padding: 7px;
width: 60px;
text-align: center;
border: 1px solid #e1e1e1;
cursor: default;
}
.prExerVariNameTD {
border: 1px solid #e1e1e1!important;
padding: 5px 5px 5px 10px;
background-color: white;
}
とても簡単です。 –