我在嘗試滾動具有可變數量的行和列的表格時遇到問題。我試圖把溢出(自動和滾動)和最大高度和寬度都包含表格和表格本身。我複製了代碼的源代碼和我的css類。如果有人能幫助我,我會感激!如何用可變數量的行和列滾動表格
<div class="divCuotas">
<table class="tablaCuotas" cellpadding="1px" cellspacing="0">
<tr style="background-color: rgb(153, 153, 153);">
<td class="fullTableTD"colspan = "2">Comercio</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
<td class="fullTableTD">10/02/2010</td>
</tr>
<tr class = "dataTables">
<td rowspan="2">Fravega</td><td>Cuota</td>
<td>1/9</td>
<td>2/9</td>
<td>3/9</td>
<td>4/9</td>
<td>5/9</td>
<td>6/9</td>
<td>7/9</td>
<td>8/9</td>
<td>9/9</td>
<td>10/9</td>
<td>11/9</td>
<td>12/9</td>
<td>13/9</td>
<td>14/9</td>
<td>15/9</td>
<td>16/9</td>
<td>17/9</td>
<td>18/9</td>
</tr>
<tr class = "dataTables">
<td>$</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
<td>10</td>
</tr>
<tr class = "dataTables">
<td rowspan = "2">Garbarino</td>
<td>Cuota</td>
<td>1/2</td>
<td>2/2</td>
</tr>
<tr class = "dataTables">
<td>$</td>
<td>13</td>
<td>13</td>
</tr>
</table>
</div>
這裏是CSS:
.tablaCuotas{
line-height:15px;
overflow:scroll;
height:100px;
width:100px;
margin-bottom: 5px;
display: inline-table;
background-color:#ededed;
}
.divCuotas{
overflow:scroll;
height:100px;
width:100px;
font-weight:normal;
margin-bottom: 20px;
display: inline-table;
text-align:center;
}
是的!謝謝youuuuu 你救了我! genious :) – Nicole 2010-02-10 14:47:10
只有一個問題...我如何讓我的問題文本有顏色,而不是解釋的HTML代碼?因爲有人向我求助,我從來沒有學過如何去做。謝謝! – Nicole 2010-02-10 15:13:17
我編輯了你..你必須選擇你的代碼,然後點擊編輯器頂部條上有1和0的按鈕.. 看看http://stackoverflow.com/editing-help – 2010-02-10 15:39:07