Magento,CSS无法在IE8上正确呈现

时间:2014-10-22 12:55:16

标签: php css magento internet-explorer-8

我是magento的新手,

我在Magento有一个项目,但它的布局在IE8中打破了,

我试过

 <!--[if IE 8]>
      .category-grid .item { 
           display:inline-block !important; 
      }
 <![endif]-->

这些代码在css文件中但没有效果。

2 个答案:

答案 0 :(得分:1)

显示:如果您的HTML代码前没有<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">,则inline-block在IE8中无效。

答案 1 :(得分:0)

CSS样式应该用<style>标签编写。像这样:

<!--[if IE 8]>
  <style>
      .category-grid .item { 
          display:inline-block !important; 
      }
  </style>
<![endif]-->
相关问题