A page I am working on displays a span inside a div in bold sometimes, while in others it displays it unboldened with the same markup.
Good (Product Details is bold) – Screenshot
<div class=infoPanel><span>Product Details</span><br /><ul><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></ul></div>
Bad (Product Details is NOT bold) – 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>
The actual page is here.
This only happens in Firefox. In all other browsers, both instances of “Product Details” are bold. I don’t see any surrounding parent HTML elements that could be affecting styling.
Any ideas why this would happen?
I’ve found the problem, but its not pretty. I don’t know what Javascript voodoo you are using, but conjuring up code this bad takes some serious mojo.
Yup. That’s how the tooltip box looks like in code. That would be two, I repeat, two nested tables generated by your evil script. Now the problem is pretty obvious: the
spanin question is wrapped in afonttag (shivers) with afont-weight: normalstyle attribute.Now leave me alone while I contemplate what I’ve I done to deserve this. Shiver