除了Firefox之外,为什么每个浏

时间:2010-08-16 15:13:32

标签: css firefox

我正在处理的页面有时会以粗体显示div内的跨度,而在其他页面中,它会显示未使用相同标记的内容。

好(产品详情粗体) - Screenshot

<div class=infoPanel><span>Product Details</span><br /><ul><li>7.7% APR for loans between &pound;7,500 to &pound;14,999 for up to 5 years</li><li>Available if you are a main FlexAccount customer</li><li>No obligation quotes</li><li>Quotes tailored to your individual circumstances and the amount you would like to borrow</li><li>Quick decision on your loan application</li><li>Between 1 and 7 years repayment terms available</li><li>A fixed rate for the term of your loan</li><li>No hidden fees or charges</li><li>For the first month no repayments have to be made</li></ul></div>

错误(产品详情不粗体) - Screenshot

<div class=infoPanel><span>Product Details</span><br /><ul><li>Easy to apply and you will get a decision in minutes</li><li>Receive your cheque in 24 hours</li><li>Protect your personal loans against the things that worry you </li><li>Apply for an instant personal loan online today</li></ul></div>

实际页面为here

这只发生在Firefox中。在所有其他浏览器中,“产品详细信息”的两个实例都是粗体。我没有看到任何可能影响样式的周围的父HTML元素。

为什么会发生这种情况的任何想法?

2 个答案:

答案 0 :(得分:8)

我发现了问题,但它并不漂亮。我不知道你正在使用什么Javascript伏都教,但是想到这个糟糕的代码需要一些严肃的魔力。

<div style="position: absolute; z-index: 1010; left: -250px; top: 0px; width: 250px; visibility: hidden;" id="tOoLtIp032">
<table cellspacing="0" cellpadding="0" border="0" bgcolor="#666666" width="250" style="background: none repeat scroll 0% 0% rgb(102, 102, 102);"><tbody><tr><td><table cellspacing="2" cellpadding="5" border="0" width="100%">
<tbody><tr>
<td bgcolor="#ffffff" align="left" style="text-align: left; padding: 5px;"><font color="#000000" face="verdana,arial,helvetica,sans-serif" style="color: rgb(0, 0, 0); font-family: verdana,arial,helvetica,sans-serif; font-size: 10px; font-weight: normal;">
</font>
<div class="infoPanel"><span>


<font color="#000000" face="verdana,arial,helvetica,sans-serif" style="color: rgb(0, 0, 0); font-family: verdana,arial,helvetica,sans-serif; font-size: 10px; font-weight: normal;">Product Details</font>


</span><font color="#000000" face="verdana,arial,helvetica,sans-serif" style="color: rgb(0, 0, 0); font-family: verdana,arial,helvetica,sans-serif; font-size: 10px; font-weight: normal;">
<br></font><ul><font color="#000000" face="verdana,arial,helvetica,sans-serif" style="color: rgb(0, 0, 0); font-family: verdana,arial,helvetica,sans-serif; font-size: 10px; font-weight: normal;">
<li>7.7% APR for loans between £7,500 to £14,999 for up to 5 years</li><li>Available if you are a main FlexAccount customer</li>
<li>No obligation quotes</li>
<li>Quotes tailored to your individual circumstances and the amount you would like to borrow</li><li>Quick decision on your loan application</li>
<li>Between 1 and 7 years repayment terms available</li><li>A fixed rate for the term of your loan</li><li>No hidden fees or charges</li>
<li>For the first month no repayments have to be made</li></font></ul></div><font color="#000000" face="verdana,arial,helvetica,sans-serif" style="color: rgb(0, 0, 0); font-family: verdana,arial,helvetica,sans-serif; font-size: 10px; font-weight: normal;">
</font></td></tr></tbody></table></td></tr></tbody></table></div>

烨。这就是工具提示框在代码中的样子。那将是两个,我再说一遍,两个嵌套表由你的邪恶脚本生成。现在问题非常明显:所讨论的span包含在font标记(颤抖)中,并带有font-weight: normal样式属性。

现在,在我思考我所做的事情时,让我一个人待命。 寒战

答案 1 :(得分:1)

我用FF 3.6.2检查了它,并注意到即使第二个列表没有出现粗体而第三个列表出现。这意味着您的标记存在一些问题。确保在所有情况下都指定了正确的标记。

你也可以尝试这个css:

div.infoPanel span{
  font-weight:bold;
}
相关问题