繁体   English   中英

在CSS中使用“ top”标记后删除空格

[英]Removing White-space after using “top” tag in CSS

我正在这个网站上工作!! ,但我有一个小问题。

我知道这可能是非常基本的,但是我似乎无法使其工作:/

在网站底部的页脚处,我有一个空白要删除。 我尝试使用margin-bottom无济于事

还有什么我应该做的吗?

这是我的代码:

的HTML

 <div id="footer">
    </div>
    <div id="bottombanner">
    </div>

的CSS

    #footer{
    background: url("../images/footer.gif") no-repeat top left; 
    height: 370px;
    overflow: hidden;
    z-index: 1000;
    position: relative;
}

    #bottombanner{
      background-color: rgb( 22, 47, 66 );
      left: 0px;
      width: 100%;
      height: 60px;
      top: -31px;
      z-index: 1;
      position: relative;
 }

任何帮助将不胜感激!! 谢谢!

#bottombanner top更改为margin-top

#bottombanner{
      background-color: rgb( 22, 47, 66 );
      left: 0px;
      width: 100%;
      height: 60px;
      margin-top: -31px;/*this*/
      z-index: 1;
      position: relative;
}

将属性top:-31pxmargin-top:-31px; 适用于#bottombanner

暂无
暂无

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

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