Chrome保证金错误

时间:2015-02-18 09:02:17

标签: css css3

我管理的网站:http://www.charisbiblecollege.org.uk/

在Chrome中,页脚和页面底部似乎有差距。那里有一个白色的空间。它不大但它确实让我烦恼。

我认为它已与margin: 0;标记上的width: 100%<body>相关联,是否有人可以解释/帮助?

在其他浏览器中似乎没有发生。

3 个答案:

答案 0 :(得分:1)

由规则div.row:after引起,您将其添加为内容.。有4个简单的修复,使用需要你。理想情况可能是第一个,content: ''。下面我列出了你的所有选择。

  1. 您只需添加一个空白字符串content: ''font-size: 0

    div.row:after {content: ''; ...} /* OR */
    div.row:after {font-size: 0; ...}
    
  2. 或者将overflow: hidden放到此规则中:

    div.row:after {overflow: hidden}
    
  3. 或者将overflow: hidden放到#wrap

    #wrap {overflow: hidden}
    

答案 1 :(得分:0)

div.row:在创造了空白之后,我也在firefox中看到了它。 将content: ".";更改为content: "";

div.row:after {
    clear: both;
    content: ".";
    display: block;
    height: 0;
    line-height: 0;
    visibility: hidden;
}

答案 2 :(得分:0)

更改

div.row:after {
clear: both;
content: ".";
display: block;
height: 0;
line-height: 0;
visibility: hidden;
}

div.row:after {
clear: both;
content: "";
display: block;
height: 0;
line-height: 0;
visibility: hidden;
}

了解更多信息,请查看clearfix-hack article