【问题标题】:responsive column widths not responding in internet explorer响应式列宽在 Internet Explorer 中没有响应
【发布时间】:2014-11-19 07:32:41
【问题描述】:

对不起,这个非常模糊的标题,但我不知道如何将我非常奇怪的问题放在一句话中。我正在使用响应式 wordpress 主题。响应式网格系统适用于 Firefox,但我在 Internet Explorer 开发人员工具中看不到网格样式,并且我的所有列都是 100% 宽的。我首先认为这是一个缓存问题,但我禁用了缓存,仍然没有运气。就好像IE突然不理解任何样式一样!这是我的网格:

.wpb_row {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
/* Grid with fluid columns */
.vc_row-fluid {
  width: 100%;
  *zoom: 1;
}
.vc_row-fluid:before,
.vc_row-fluid:after {
  display: table;
  content: "";
}
.vc_row-fluid:after {
  clear: both;
}
.vc_row-fluid [class*="vc_span"],
.vc_row-fluid [class*="vc_col"] {
  display: block;
  width: 100%;
  min-height: 5px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
  float: left;
  margin-left: 3%;
}
.vc_row-fluid [class*="vc_span"]:first-child,
.vc_row-fluid [class*="vc_col"] {
  margin-left: 0;
}
.vc_row-fluid .vc_span12,
.wpb_teaser_grid.wpb_carousel .vc_span12,vc_span12, .vc_row-fluid .vc_col-sm-12 {
  width: 100%;
}
.vc_row-fluid .vc_span11, vc_span11, .vc_row-fluid .vc_col-sm-11 {
  width: 91.41666666666667%;
}
.vc_row-fluid .vc_span10 , vc_span10, .vc_row-fluid .vc_col-sm-10{
  width: 82.83333333333333%;
}
.vc_row-fluid .vc_span9, vc_span9, .vc_row-fluid .vc_col-sm-9 {
  width: 74.25%;
}
.vc_row-fluid .vc_span8, vc_span8, .vc_row-fluid .vc_col-sm-8 {
  width: 65.66666666666666%;
}
.vc_row-fluid .vc_span7, vc_span7, .vc_row-fluid .vc_col-sm-7 {
  width: 56.83333333333333%;
}
.vc_row-fluid .vc_span6,
.wpb_teaser_grid.wpb_carousel .vc_span6, vc_span6, .vc_row-fluid .vc_col-sm-6 {
  width: 48.5%;
}
.vc_row-fluid .vc_span5 , vc_span5, .vc_row-fluid .vc_col-sm-5 {
  width: 40.16666666666667%;
}
.vc_row-fluid .vc_span4,
.wpb_teaser_grid.wpb_carousel .vc_span4, vc_span4, .vc_row-fluid .vc_col-sm-4 {
  width: 31.33333333333333%;
}
.vc_row-fluid .vc_span3,
.wpb_teaser_grid.wpb_carousel .vc_span3 , vc_span3, .vc_row-fluid .vc_col-sm-3 {
  width: 22.75%;
}
.vc_row-fluid .vc_span2, vc_span2, .vc_row-fluid .vc_col-sm-2 {
  width: 14.16666666666667%;
}
.vc_row-fluid .vc_span1, vc_span1, .vc_row-fluid .vc_col-sm-1 {
  width: 5.583333333333333%;
}

如果你想调试的话,还有站点 url:http://tinyurl.com/ysq2yu。我不知道为什么 IE 无法呈现这个非常简单直接的 css!我正在使用 Internet Explorer 11,但其他版本显然也有同样的问题。任何帮助深表感谢。

更新 1:说真的,IE 就是无法停止让我们的生活变得地狱!!!并认为我对 IE11 很兴奋!!!我刚刚在 msdn 中读到,自 IE10 以来条件样式表已停止使用,因此我的页面在 IE8 中显示更接近原始页面(我有一个条件样式表,我通过我的网格拼命尝试解决问题),并且 100% 宽IE10 和 11!!

【问题讨论】:

  • 我有 ie11,我看到网站布局响应较小的浏览器宽度。
  • 我的资源是1440x900,我也遇到了1920x1080 的问题!!!它快把我逼疯了!
  • 在 IE11 中为我工作。
  • 也许截图会有所帮助

标签: html css wordpress internet-explorer


【解决方案1】:

好吧,我发现有什么问题,你甚至没有调用你的 ie.css,实际上你在调用它,但是对于 IE 小于 IE8,所以在 IE7 中你的样式表被调用,但在 IE8 及更高版本中它不是。所以从

更改您的条件评论

<!--[if lt IE 8]><link rel="stylesheet" href="http://www.pwmania.com/wp-content/themes/PWMNewsMorning/lib/css/ie.css" type="text/css" media="screen, projection" /><![endif]-->

类似

<!--[if gt IE 8]><link rel="stylesheet" href="http://www.pwmania.com/wp-content/themes/PWMNewsMorning/lib/css/ie.css" type="text/css" media="screen, projection" /><![endif]-->

更多信息在这里http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx。问题是你声明了'lt'(小于)而不是'gt'(大于)条件。只需阅读文档,您就可以轻松找出需要更改的内容。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-10-31
    • 1970-01-01
    • 2013-01-28
    • 1970-01-01
    • 2013-06-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多