【发布时间】:2012-07-12 04:11:28
【问题描述】:
这是我在 C# 代码中的 html 代码
tosend = "<p><tr><th>The directory searched: " + path + " </th><th> between the dates " + fdate + " and " + ldate + "</th></tr> <br> </p> <tr><th>File Name</th> <th>File Date</th> <th>File Hash</th> <th>Beamer Date</th> <th>Beamer Hash</th> <th>Status</th></tr>";
for (int i = 0; i < thexfiles.Length; i++)
{
tosend = tosend + "<tr><td>" + thexfiles[i] + "</td><td>" + filedate[i] + "</td><td>" + hashList[i] + "</td><td>" + thexdates[i] + "</td><td>" + beamerHash[i] + "</td><td>" +status[i] + "</td></tr>";
}
tosend = "<html><table border="+1+">" + tosend + "</table></html>";
这是一个外观链接:Click Here
我想做的是,
- 我想扩展第一行,使其与其他行的大小相同,
- 您可以看到日期行和状态行的高度太大,我希望它们看起来像一条线,就像展开一样。
这就是我所需要的,到目前为止我已经尝试过正常的html宽度-高度等,我可能因为错误的符号而无法成功。
【问题讨论】:
-
到目前为止你尝试过什么?已阅读 th 标签上的文档? w3schools.com/tags/tag_th.asp
-
我尝试定义它们的宽度和高度,高度似乎适用于第一行,但宽度没有。我已经检查了该链接
-
您的 HTML 无效。
<tr>不能是<p>的子级。
标签: c# html html-table