我遇到了一个问题,IE7无法显示一个表格(不用担心,这个表格只是用来显示数据的),其中表格行有一个在x轴上重复的背景图片,而表格分割线(在这种情况下是TH)有一个单独的背景图片,它根本不会重复。
请不要责备我的CSS,其中一些是“喷射和祈祷”CSS,希望有些东西可以解决它。
所以我无论如何都想不出为什么会有这个问题。IE8没有这个问题。
有任何想法吗?
这是一个例子:
(来源:bkit.ca)
这是CSS:
<style>
table,
td,
th,
tr {
border: none;
}
table tr {
border-bottom: 1px solid #BEBEBE;
}
table td {
padding: 7px;
border-left: 1px solid #BEBEBE;
border-right: 1px solid #BEBEBE;
}
table th {
padding: 7px;
text-align: left;
}
table .header {
background-image: url(/images/layout/nav_background.png);
background-position: top;
background-repeat: repeat-x;
height: 37px;
border: none;
margin: 2px;
}
table .header th {
color: white;
font-weight: normal;
text-align: center;
}
table .header th.first {
background-color: transparent;
background-image: url(/images/layout/nav_left.png);
background-repeat: no-repeat;
background-position: top left;
}
table .header th.last {
background-image: url(/images/layout/nav_right.png);
background-repeat: no-repeat;
background-position: top right;
background-color: transparent;
}
</style>
这里是HTML:
<table>
<tr class="header">
<th class="first">a</th>
<th>b</th>
<th class="last">a</th>
</tr>
</table>
请不要责备我的CSS,其中一些是“喷射和祈祷”CSS,希望有些东西可以解决它。
所以我无论如何都想不出为什么会有这个问题。IE8没有这个问题。
有任何想法吗?