我想要一張6桌並排,但是當他們到達他們的最後時,他們在下一行被排序。並排的桌子上有溢出
我試過float,但是當顯示寬度達到時,元素仍然在下一行開始。
歡迎任何提示。
這是我的代碼:我拿走了所有樣式格式,因爲我無法將它們排成一行。
Link: http://jsfiddle.net/S3n6D/101/
我想要一張6桌並排,但是當他們到達他們的最後時,他們在下一行被排序。並排的桌子上有溢出
我試過float,但是當顯示寬度達到時,元素仍然在下一行開始。
歡迎任何提示。
這是我的代碼:我拿走了所有樣式格式,因爲我無法將它們排成一行。
Link: http://jsfiddle.net/S3n6D/101/
我想你可以使用這個css;
table {
width:15%;
float:left;
}
如果你想要更寬的表格,你也可以改變身體的寬度;
body {
width:1800px;
}
table {
width:300px; /* or 15% if you want it more dynamic */
margin:0;
float:left;
}
當行結束時,元素被設置在一個新的行上...我只想排列它們並使其滾動... – Moonstar
經過一番清潔與秩序到您的代碼,請嘗試:
div {
float: left;
}
<table border="1">
<thead>
<tr>
<th rowspan="1"> </th>
</tr>
<tr>
<th>Filiale</th>
</tr>
</thead>
</table>
<br>
<div>
<table border="1">
<!-- MO -->
<thead>
<tr>
<th colspan="14">19.09.2016</th>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
<th>8</th>
<th>9</th>
<th>10</th>
<th>11</th>
<th>12</th>
<th>13</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div>
<table border="1">
<!-- DI -->
<thead>
<tr>
<th colspan="13">20.09.2016</th>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
<th>8</th>
<th>9</th>
<th>10</th>
<th>11</th>
<th>12</th>
<th>13</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div>
<table border="1">
<!-- MI -->
<thead>
<tr>
<th colspan="13">21.09.2016</th>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
<th>8</th>
<th>9</th>
<th>10</th>
<th>11</th>
<th>12</th>
<th>13</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div>
<table border="1">
<!-- DO -->
<thead>
<tr>
<th colspan="13">22.09.2016</th>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
<th>8</th>
<th>9</th>
<th>10</th>
<th>11</th>
<th>12</th>
<th>13</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div>
<table border="1">
<!-- FR -->
<thead>
<tr>
<th colspan="13">23.09.2016</th>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
<th>8</th>
<th>9</th>
<th>10</th>
<th>11</th>
<th>12</th>
<th>13</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div>
<table border="1">
<!-- SA -->
<thead>
<tr>
<th rowspan="1"> </th>
<th colspan="13">24.09.2016</th>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
<th>6</th>
<th>7</th>
<th>8</th>
<th>9</th>
<th>10</th>
<th>11</th>
<th>12</th>
<th>13</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
您可以發佈您的代碼? – Dsenese1
是的,我只是拿走了風格,因爲我真的搞砸了...你能給我提示嗎? – Moonstar
您應該使用代碼片段將實際代碼粘貼到問題中,而不是鏈接。 –