【发布时间】:2013-11-13 04:54:57
【问题描述】:
我不明白为什么我的列不会跨越我创建的顶行和底行。它应该看起来像“今天”列的顶部和底部比其他列高。
代码很多,我不确定在不变形或添加新变量(它需要流体高度)的情况下应该剪切什么。 JSFiddle:http://jsfiddle.net/DaAwesomeP/aU9Le/
基本 HTML 布局:
<table id="weatherForecast">
<tr class="weatherForecast-row-outer">
<td></td>
</tr>
<tr id="weatherForecast-row">
<td id="weatherForecast-DATE" class="weatherForecast-day weatherForecast-day-today" rowspan="3">
<!-- Cell Content for "Today" Here -->
<td id="weatherForecast-DATE" class="weatherForecast-day ">
<!-- Cell Content Here -->
</td>
</tr>
<tr class="weatherForecast-row-outer">
<td></td>
</tr>
</table>
这是显示我想要的图像:
【问题讨论】:
-
这个问题显然是关于尝试以违反 HTML 表格模型的方式使用
rowspan和colspan解决设计问题。修改后的问题,带有指向页面和图像的链接,仍然含糊不清,需要解释,它要求设计帮助,所以这里是题外话。此外,这种方法可能是错误的:问题似乎是显示一个表格以便一个单元格被替换,这可能比 HTML 表格更好地处理 CSS 定位。
标签: html css html-table row