简体   繁体   English

IE7中的自举边框问题

[英]Bootstrap border issue in IE7

I'm using Bootstrap's responsive grid to layout an HTML page. 我正在使用Bootstrap的响应式网格来布局HTML页面。 Though the form looks perfect in Chrome, in IE7, when I use a border, the box model will jump down in the fluid. 尽管该表单在Chrome中看起来很完美,但在IE7中,当我使用边框时,盒子模型会在流体中跳跃。

Example: 例:

HTML: 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: CSS:

.box{
   border:5px solid red;
}

This HTML and CSS works fine in Chrome, Firefox, IE 8, 9, and 10. 此HTML和CSS在Chrome,Firefox,IE 8、9和10中可以正常工作。

Why, in IE7 does the last span jump down? 为什么在IE7中最后一个跨度会跳下来?

I know this is an IE bug with box model, do you have any idea on how to fix it? 我知道这是带有框模型的IE错误,您对如何解决它有任何想法吗?

add this script in page for IE 7 在IE 7页面中添加此脚本

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

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

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