【发布时间】:2011-01-30 21:22:43
【问题描述】:
我很难让 span 标签在表格中正常工作。看起来好像整个 span 标记被忽略了,它在 Firefox 中的 table 标记之间的任何位置定义,但在 IE 中这显示正确。
也许我遗漏了一些东西,但我创建了一个小示例 CSS 和 html 文件,在 Firefox 和 IE 中显示不同。希望有人能告诉我为什么会这样,或者我可以如何重新排列 html 以解决 Firefox 中的问题。
---main.css---
.class1 A:link {color:#960033; text-decoration: none}
.class1 A:visited {color:#960033; text-decoration: none}
.class1 A:hover {color:#0000FF; font-weight: bold; text-decoration: none}
.class1 A:active {color:#0000FF; font-weight: bold; text-decoration: none}
.class2 A:link {color:#960033; text-decoration: none}
.class2 A:visited {color:#960033; text-decoration: none}
.class2 A:hover {color:#0000FF; text-decoration: none}
.class2 A:active {color:#0000FF; text-decoration: none}
---test.htm---
<HTML>
<HEAD>
<title>Title Page</title>
<style type="text/css">@import url("/css/main.css");</style>
</HEAD>
<span class="class1">
<BODY>
<table><tr><td>
---Insert Hyperlink---<br>
</td></tr>
</span><span class="class2">
<tr><td>
---Insert Hyperlink---<br>
</td></tr></table>
</span>
</BODY>
</HTML>
【问题讨论】:
-
天哪,真是一团糟……很难写出这么糟糕的标记。我特别在 (!) 之前开始并在 ! 之前结束的
标签: html css firefox html-table