IE7中的Bootstrap边界问题

时间:2013-06-11 04:00:25

标签: html css twitter-bootstrap internet-explorer-7

我正在使用Bootstrap的响应式网格来布局HTML页面。虽然Chrome中的表格看起来很完美,但在IE7中,当我使用边框时,盒子模型会在流体中跳跃。

示例:

HTML:

<div class="row-fluid">
    <div class="box span3"></div>
    <div class="box span3"></div>
    <div class="box span3"></div>
    <div class="box span3"></div>
</div>

CSS:

.box{
   border:5px solid red;
}

此HTML和CSS在Chrome,Firefox,IE 8,9和10中运行良好。

为什么在IE7中最后一个跨度会跳下来?

我知道这是一个关于盒子模型的IE漏洞,您对如何修复它有什么想法吗?

1 个答案:

答案 0 :(得分:0)

在IE 7的页面中添加此脚本

 <!--[if IE 7]>
<style>
    .row-fluid .span3{
        width:22.80% !important;
    }
</style>
<![endif]-->
相关问题