2014-11-16 32 views
0

複雜的表,我有以下示例表:與ROWSPAN

<table border="1" align="right" width="200"> 
 
     <tr> 
 
      <td rowspan="2">Main Category</td> 
 
      <td>top right</td> 
 
     </tr> 
 
     <tr> 
 
      <td>bottom right</td> 
 
     </tr> 
 
    </table>

對於右上方,我喜歡創造另一列到它與3行稱爲權一,右二,右三。

對於右下角我喜歡創建,使其右側有另一列,有4行稱爲底部1,底部2,底部3,底部4。

我知道我需要進一步使用rowspan,但嘗試了一些東西,但我無法讓它工作。
任何援助將不勝感激。

+0

你顯示與表格數據 - 或者你只是想用這個表格佈局的目的?後者你甚至不應該從頭開始。 – CBroe

+0

使用表格格式 –

+0

您應該將表格邊框,對齊方式和寬度設置爲不使用html,這些標記已被棄用且不受HTML5支持 – Billy

回答

0

<table border="1" align="right" width="200"> 
 
     <tr> 
 
      <td rowspan="2">Main Category</td> 
 
      <td><table border=1 width=100%> 
 
       <tr><td rowspan=3>Top Right</td><td>Right one</td></tr> 
 
       <tr><td>Right two</td></tr> 
 
       <tr><td>Right three</td></tr> 
 
       </table></td> 
 
     </tr> 
 
     <tr> 
 
      <td><table border=1 width=100%> 
 
       <tr><td rowspan=4>Bottom Right</td><td>Bottom one</td></tr> 
 
       <tr><td>Bottom two</td></tr> 
 
       <tr><td>Bottom three</td></tr> 
 
       <tr><td>Bottom four</td></tr> 
 
       </table></td> 
 
     </tr> 
 
    </table>