Firefox 4 中的表格元素忽略字体粗细?
我不确定这是否只是 Firefox 4 的一个问题,但我已经尝试了所有方法,此外我还花费了几个小时试图找到其他人没有遇到过的问题的解决方案。 问题是我有一个表格,无论表格中的元素是什么,
(<th>, <td>, <caption>)
它们都会被忽略,
font-weight: bold;, <strong></strong>, and <b></b>
我知道
<th>
元素通常默认情况下更粗体,但在这个特定的表格中也不是这种情况。 现在更重要的是,这似乎只发生在某些平台上的某些浏览器中,例如在 Ubuntu 中,Firefox 4 可以完美地呈现所有内容,IE 也是如此,但是,Chrome、Safari 和 Windows 版 Firefox 4 都无法正确显示。 我什至不知道从哪里开始解决这个问题,因为我觉得我已经用尽了我的选择。请帮忙!
I'm not sure if this is simply an issue with Firefox 4, but I have tried absolutely everything, additionally I have search for hours trying to discover a solution for a problem that it appears no one else has had.
The issue is that I have a table and no matter what the element in the table is
(<th>, <td>, <caption>)
all of them ignore
font-weight: bold;, <strong></strong>, and <b></b>
I know that
<th>
elements generally are bolder by default however this is not the case in this particular table either.
And now for the kicker, this appears to only occur in certain browsers on certain platforms, for example in Ubuntu Firefox 4 renders everything perfectly, as does IE, however, Chrome, Safari and Firefox 4 for windows all display it incorrectly.
I don't even know where to start on fixing this as I feel that I've exhausted my options. Please Help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能会遇到特殊性问题,因为某些规则被触发并且表格的样式不同。
另外,您需要小心不要使用不具有重量级系列的自定义字体。
我将从一个重要的 id 开始,使用标准字体:
将该 id 固定在表格元素上,如
id='heavy'
如果有效,请在不使用 font-family 的情况下再试一次。如果有效,请在不使用 !important 的情况下重试,因为除非绝对必要,否则您不需要额外的特异性。
You may be hitting up against a specificity problem, in that some rule is being triggered and styling the table differently.
Also, you'll want to be careful that you're not using a custom font that doesn't have a heavyweight family.
I would start off with an important id, using a standard font:
Tack that id on the table element, as
id='heavy'
If that works, try it again without the font-family. If that works, try it again without the !important, since you don't want the extra specificity unless it's strictly necessary.