1
我想對齊3個桌子,因此它們形成一個大桌子。 我想這樣做的原因是因爲我想有可以在平板電腦上工作的可滾動表格(ipad,android)。我已經得到了這個工作,我仍然需要做的唯一事情就是將頁眉和頁腳與內容對齊。我的桌面佈局看起來像這樣:爲平板電腦垂直對齊三張桌子
<!-- Fixed header table -->
<table data-role="table" class="ui-body-d ui-shadow table-stripe ui-responsive">
<thead>
<th> Header 1 </th>
<th> Header 2 </th>
<th> Header 3 </th>
</thead>
</table>
<!-- Scrollable content table -->
<div class="scroll"> <!-- This div enables the table to be scrollable -->
<table data-role="table" class="ui-body-d ui-shadow table-stripe ui-responsive">
<thead> <!-- Use a thead or JQuery Mobile 1.4 gets mad -->
<tr> </tr>
</thead>
<tbody>
<!-- This is dynamically filled -->
</tbody>
</table>
</div>
<!-- Fixed footer table -->
<table data-role="table" class="ui-body-d ui-shadow table-stripe ui-responsive">
<thead>
<tr> </tr>
</thead>
<tfoot>
<tr>
<td> Footer 1 </td>
<td> Footer 2 </td>
<td> Footer 3 </td>
</tr>
</tfoot>
</table>
我已經嘗試給每個單元格一個最大寬度,但它似乎沒有工作。 這是不是有一個默認的解決方案?
在此先感謝。
編輯:
我希望它是這樣排列: http://i.imgur.com/Cipa9f6.png
謝謝,但我檢查了你的JSFiddle,但頁眉和頁腳未對齊。 – JeffreyZ
你想如何在你的問題中放置照片或畫線。 –
已編輯的問題。 – JeffreyZ