表格布置面板顶行,合并顶行 [英] table lay out panel top row, merging top rows

查看:85
本文介绍了表格布置面板顶行,合并顶行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我正在打印一个表格布局控件,它具有3行4列,
就像表格一样,我想在第一行中写标题,并且我想合并第一行,
我希望桌子摆成这样:


--------------------------
|驶向多个行|
|------|-----|
| | |
| ---- -----| ----|
| | |
| | |
| --- -----|
| | |
------| -----|

任何建议,我可以添加什么,我都尝试过使用图像,标签等,但它仅适合一个单元格,而不在顶部一列中使用两行和三行,
任何人都可以帮我解决问题,

解决方案

在第一行中使用colspan =没有所需的列数";
例如:您的情况下colspan ="4"

< table width ="100%" border ="0" cellpadding ="0" cellspacing ="0">
< tr>< td colspan ="4">您的标题</td></tr>
< tr>
< td>内容</td>
< td>内容</td>
< td>内容</td>
< td>内容</td>
</tr>
< tr>
< td>内容</td>
< td>内容</td>
< td>内容</td>
< td>内容</td>
</tr>
< tr>
< td>内容</td>
< td>内容</td>
< td>内容</td>
< td>内容</td>
</tr>
</table>


hi i am printing a table layout control, it has 3 rows and 4 columns,
Just like a table i want to write heading in the top row, and i want to merge the top row,
i want the table lay out look like this:


--------------------------
|HEADING ON MULTIPLE ROWS|
|- - - - - -|- - -- - - |
| | |
|---- ---- - | - - -- - |
| | |
| | |
| --- -- - - | - - - - --|
| | |
- - - - - - | - - - - -|

Any suggestion what can i add, i tried usng image, label etc but it fits in only one cell, not using two and three rows in the top column,
anyone can help me out plz,

解决方案

use colspan="no of columns you want" in first row;
ex : colspan="4" in your case

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="4">YOUR HEADING</td></tr>
<tr>
<td>content</td>
<td>content</td>
<td>content</td>
<td>content</td>
</tr>
<tr>
<td>content</td>
<td>content</td>
<td>content</td>
<td>content</td>
</tr>
<tr>
<td>content</td>
<td>content</td>
<td>content</td>
<td>content</td>
</tr>
</table>


这篇关于表格布置面板顶行,合并顶行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆