簡體   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