【发布时间】:2010-10-15 20:16:34
【问题描述】:
有一个由表单标签包围的数据表。页面底部有一个固定的页脚。
当表格为空时(仅显示表格标题),整个页脚会移出屏幕的一半,向右移动。
有什么想法吗?
<form action="/cgi-bin/Lib.exe" method=POST name="dd" ID="Form1">
<div id="yyy">
<table cellspacing="0" ID="Table1">
<thead>
<tr>
<th>Start</th>
<th>End</th>
</tr>
</thead>
<p><small><font face="Arial"><small>$DATA</small></font></small></p>
<tbody>
<tr>
<td><input type=radio name="begin" value="$START" ID="Radio0"> $START</td>
<td>$END <input type=radio name="end" value="$END" ID="Radio3"></td>
</tr>
<tr>
<td><input type=radio name="begin" value="$START" ID="Radio1"> $START</td>
<td>$END <input type=radio name="end" value="$END" ID="Radio4"></td>
</tr>
<tr>
<td><input type=radio name="begin" value="$START" ID="Radio2"> $START</td>
<td>$END <input type=radio name="end" value="$END" ID="Radio5"></td>
</tr>
</tbody>
</table>
</div>
<p><small><font face="Arial"><small>$DATA</small><strong></p>
</strong></font></small>
</form>
<div id="footer">
<div id="labfooter">
</div>
</div>
CSS:
#footer {
width:100%;
height:5em;
}
html>body #footer {
position:fixed;
bottom:0;
z-index:10; /* Prevent certain problems with form controls */
}
#header,
#footer {
color:#111;
background:#ddd;
text-align:center;
}
【问题讨论】:
-
您能否展示一些示例代码?
-
哪个浏览器?使用 ff 3.0.7/xp 在这里工作。
-
已修复,$DATA 标记是表格模板的标记。由于数据标记在表格之外,它把事情搞砸了。谢谢!
标签: html css layout html-table footer