【问题标题】:white space below footer and above on re sizing window调整大小窗口时页脚下方和上方的空白
【发布时间】:2014-02-14 13:37:48
【问题描述】:

我的页脚上方和下方都有空白,有一个空白,请检查下面的css

.footer {
background-image: url("../images/footer_image.png");
background-repeat: no-repeat;
background-size: 100% auto;
float: left;
height: auto;
width: 100%;
        }

.footer_bg {
background-image: url("../images/footer_bg.png");
background-repeat: no-repeat;
background-size: 101% auto;
height: 232px;
margin-top: 12.1%;
width: 100%;
}

【问题讨论】:

    标签: html css responsive-design removing-whitespace


    【解决方案1】:

    我在您的网站中看到了 8 像素的正文边距。添加或删除现有的。

    body{
    margin:0;
    padding:0;
    }
    

    错误

    【讨论】:

    • 我刚刚添加了但没有回应。
    • 尝试添加!important.body{ margin:0 !important; padding:0 !important; }
    • 我已经在 mystyle.css 中添加了这段代码,是否正确?
    • 是的,你是。但我检查了网站,仍然没有任何变化。或者你只是在本地更新了它?
    • 请立即查看@a_enriquez
    【解决方案2】:

    页面正文有 8px 的边距。

    我在你添加的我的 style.txt 中看到了

    !important .body
    { margin:0 !important; 
     padding:0 !important; 
    }
    

    这需要是:

    body
    { 
    margin:0 !important; 
    padding:0 !important; 
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-09-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-11
      • 1970-01-01
      • 2012-09-17
      相关资源
      最近更新 更多