简体   繁体   English

响应列宽在Internet Explorer中不响应

[英]responsive column widths not responding in internet explorer

sorry about the very vague title, but I don't know how I can put my very weird problem in one sentence. 对标题含糊不清表示抱歉,但我不知道如何用一句话来说明我非常奇怪的问题。 I am using a responsive wordpress theme. 我正在使用响应式wordpress主题。 The responsive grid system works fine for firefox, but I can not see the grid styles in internet explorer developer tools and all my columns are 100% wide. 响应式网格系统适用于firefox,但我在Internet Explorer开发人员工具中看不到网格样式,并且我所有的列都为100%宽。 I thought first that it was a caching problem, but I have disabled caching and still no luck. 我首先认为这是一个缓存问题,但是我禁用了缓存,但仍然没有运气。 it is as if IE suddenly doesn't understand any of the styles! 好像IE突然不了解任何样式! here's my grid: 这是我的网格:

.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%;
}

and the site url if you want to debug: http://tinyurl.com/ysq2yu . 以及要调试的网站网址: http : //tinyurl.com/ysq2yu I have no idea why IE fails to render this very simple and straight forward css! 我不知道为什么IE无法呈现这种非常简单直接的CSS! I am using internet explorer 11, but other versions apparently has the same problem too. 我正在使用Internet Explorer 11,但其他版本显然也存在相同的问题。 Any help is much appreciated. 任何帮助深表感谢。

Update 1 : seriously, IE just can't stop making our lives hell!!! 更新1:严重的是,IE不能停止让我们的生活陷入困境!!! and to think that I was excited about IE11!!! 并以为我对IE11感到兴奋!!! I just read in msdn that conditional stylesheets have been discontinued since IE10, so my page is showing closer to original in IE8 ( i have a conditional stylesheet and I passed my grid in a desperate attempt to solve the problem), and 100% wide in IE10 and 11!! 我刚刚在msdn中读到,自IE10以来,条件样式表已经停产,因此我的页面显示得更接近IE8中的原始样式表(我有条件样式表,并且我拼命地尝试通过网格来解决问题),并且100%宽IE10和11 !!

Ok I found whats wrong, you're not even calling your ie.css, actually you ARE calling it but for IE's less than IE8, so in IE7 your stylesheet is called but in IE8 and above it's not. 好的,我发现出了什么问题,您甚至没有在调用ie.css,实际上是在调用它,但是IE小于IE8,因此在IE7中调用了样式表,但在IE8及更高版本中却没有。 SO change your conditional comment from 所以从更改您的条件评论

<!--[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]-->

to something like

<!--[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]-->

More info here http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx .The thing is that you declared 'lt' (less than) not 'gt'(greater than) condition. 有关更多信息,请参见http://msdn.microsoft.com/zh-cn/library/ms537512(v=vs.85).aspx 。问题是,您声明了“ lt”(小于)而不是“ gt”(大于)条件。 Just go trough documentation you'll easily figure out what you need to change. 只需阅读文档,您就可以轻松找出需要更改的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM