为什么Internet Explorer会忽略正文字体大小?

时间:2013-01-25 22:33:15

标签: css internet-explorer

我正在构建Magento网站,它在Firefox和Chrome中工作得非常好,但它在IE9,IE8中无法正常显示。

正文字体大小设置为12px,但IE似乎完全忽略它。

这是body元素的CSS:

body {
  background: url(../images/background/bkgd.gif) repeat-x scroll left top #FFFFFF;
  font: 12px/1.55 arial, helvetica, sans-serif;
  color: #444;
  text-align: center;
}

这是website。有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

HTML /模板中有内联样式。查看源代码并搜索我在第99行找到的20px,如下所示:

<div a align="right">
            <span style="font-weight:bold; font-size:12pt;">Your local No1Pizza is <span style="font-weight:bold; font-size:20px;"><a href="/pizza.html">Wolverhampton.<span/>
            <a style="font-weight:bold; font-size:8pt;" href="/index.php/emptybasket/ ">
            (Not your desired shop?)
            </a>
            </div>       </div>

您真的需要清理代码。还要注意上面错误的结束标记<span/>