Html制作与垂直列的表

Html制作与垂直列的表

问题描述:

我正在试图制作一个垂直列的表,Html制作与垂直列的表

是我的代码使它应该如何实现?

<table border="1" cellpadding="5" cellspacing="5" width="100%" style="background  color:white;"> 
<tr> 
    <th >Table header</th> 
    <td>Table cell 1</td> 
    <td>Table cell 2</td> 
</tr> 
</table> 
+0

您是否正在寻找具有一列或多列多列表的多列行? – Pavan 2012-01-02 09:20:40

+0

不明白。究竟是什么问题? – Burntime 2012-01-02 09:21:36

+0

@JQone多列多行 – 2012-01-02 09:21:58

尝试类似下面让多列

多行
<table border="1" cellpadding="5" cellspacing="5" width="100%" 
style="background  color:white;">  
<tr> 
    <th>Header Name1</th>  
    <th>Header name2</th>  
</tr>  
<tr>   
    <td>Row 1 Column 1</td> 
    <td>Row 2 Column 2</td>  
</tr>  
<tr>   
    <td>Row 2 Column 1</td> 
    <td>Row 2 Column 2</td>  
</tr>  

</table> 

您必须为每行添加一个单独的tr标记。

要创建你需要组织你的表为一组<tr>的第一多个垂直列和多行的表是表头,在这个标题中的每个<td>是列标题单元格和以下<tr>的都是这样的行:

<table border="1" cellpadding="5" cellspacing="5" width="100%" style="background  color:white;"> 
    <tr> 
     <th>Column1</th> 
     <th>Column2</th> 
     <th>Column3</th> 
    </tr> 
    <tr> 
     <td>Row 1 Column 1</td> 
     <td>Row 1 Column 2</td> 
     <td>Row 1 Column 3</td> 
    </tr> 
    <tr> 
     <td>Row 2 Column 1</td> 
     <td>Row 2 Column 2</td> 
     <td>Row 2 Column 3</td> 
    </tr> 
</table> 

看到这个Fiddle