Zurb基金会和IE 8 [英] Zurb Foundation and IE 8

查看:112
本文介绍了Zurb基金会和IE 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的css示例适用于所有支持的浏览器,但IE8除外(不关注低于IE 8的任何内容)。我正在使用最新版本的Foundation。

The css example below works in in all supported browsers with the exception of IE8 (not focusing on anything lower than IE 8). I'm using the latest version of Foundation.

当IE8浮动时,列在IE8中堆叠。实际看到浮动:左;在样式中应用的属性但它们不会浮动。

The columns stack in IE8 when they should float. Actually see the float:left; attribute applied in the styles but they do not float.

如果我将css类名称行,第六列等直接添加到我的标记中,那么工作是什么我宁愿不这样做。

What does work is if I add the css class names row, column six and so on directly to my mark up however I would prefer not to do so.

我似乎无法在IE 8中查明这个问题......我们非常感谢任何建议。

I can't seem to pinpoint the issue in IE 8...any suggestion would be much appreciated.

作品:

<div class="content-wrap row">
  <div class="primary six columns"></div>
  <div class="secondary six columns"></div>
</div>

不起作用:

.content-wrap {
  @include outerRow();
  .primary {
    @include column(6);
  }
  .secondary {
    @include column(6);
  }
}


推荐答案

在撰写本文时,最新版本的Foundation是Foundation 4.它的网格不支持IE8,但您可以添加对它的支持。请参阅以下链接。

The latest version of Foundation at the time of writing is Foundation 4. It's grid does not support IE8, but you can add support for it. See the following links.

FoundationGoogle群组

要点

/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column, 
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }

.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }

.lt-ie9 [class*="column"] + [class*="column"]:last-child { float: right; }
.lt-ie9 [class*="column"] + [class*="column"].end { float: left; }

.lt-ie9 .large-1, 
.lt-ie9 .row .large-1 { width: 8.33333%; }

.lt-ie9 .large-2, 
.lt-ie9 .row .large-2 { width: 16.66667%; }

.lt-ie9 .large-3, 
.lt-ie9 .row .large-3 { width: 25%; }

.lt-ie9 .large-4, 
.lt-ie9 .row .large-4 { width: 33.33333%; }

.lt-ie9 .large-5, 
.lt-ie9 .row .large-5 { width: 41.66667%; }

.lt-ie9 .large-6, 
.lt-ie9 .row .large-6 { width: 50%; }

.lt-ie9 .large-7, 
.lt-ie9 .row .large-7 { width: 58.33333%; }

.lt-ie9 .large-8, 
.lt-ie9 .row .large-8 { width: 66.66667%; }

.lt-ie9 .large-9, 
.lt-ie9 .row .large-9 { width: 75%; }

.lt-ie9 .large-10, 
.lt-ie9 .row .large-10 { width: 83.33333%; }

.lt-ie9 .large-11, 
.lt-ie9 .row .large-11 { width: 91.66667%; }

.lt-ie9 .large-12,
.lt-ie9 .row .large-12 { width: 100%; }

.lt-ie9 .row .large-offset-1 { margin-left: 8.33333%; }
.lt-ie9 .row .large-offset-2 { margin-left: 16.66667%; }
.lt-ie9 .row .large-offset-3 { margin-left: 25%; }
.lt-ie9 .row .large-offset-4 { margin-left: 33.33333%; }
.lt-ie9 .row .large-offset-5 { margin-left: 41.66667%; }
.lt-ie9 .row .large-offset-6 { margin-left: 50%; }
.lt-ie9 .row .large-offset-7 { margin-left: 58.33333%; }
.lt-ie9 .row .large-offset-8 { margin-left: 66.66667%; }
.lt-ie9 .row .large-offset-9 { margin-left: 75%; }
.lt-ie9 .row .large-offset-10 { margin-left: 83.33333%; }

.lt-ie9 .pull-2 { right: 16.66667%; }
.lt-ie9 .pull-3 { right: 25%; }
.lt-ie9 .pull-4 { right: 33.33333%; }
.lt-ie9 .pull-5 { right: 41.66667%; }
.lt-ie9 .pull-6 { right: 50%; }
.lt-ie9 .pull-7 { right: 58.33333%; }
.lt-ie9 .pull-8 { right: 66.66667%; }
.lt-ie9 .pull-9 { right: 75%; }
.lt-ie9 .pull-10 { right: 83.33333%; }

.lt-ie9 .push-2 { left: 16.66667%; }
.lt-ie9 .push-3 { left: 25%; }
.lt-ie9 .push-4 { left: 33.33333%; }
.lt-ie9 .push-5 { left: 41.66667%; }
.lt-ie9 .push-6 { left: 50%; }
.lt-ie9 .push-7 { left: 58.33333%; }
.lt-ie9 .push-8 { left: 66.66667%; }
.lt-ie9 .push-9 { left: 75%; }
.lt-ie9 .push-10 { left: 83.33333%; }

/* Nicolas Gallagher's micro clearfix */
.lt-ie9 .row { *zoom: 1; }
.lt-ie9 .row:before, .row:after { content: " "; display: table; }
.lt-ie9 .row:after { clear: both; }

这篇关于Zurb基金会和IE 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆