2013-04-25 66 views
1

我想追查爲什麼我的背景容器「background-overlay」和「background-gradient」正在推動文檔的高度遠遠超出顯示的內容?我不確定這裏發生了什麼事。可能太簡單了。爲什麼我的100%身高超大?

這裏是工作http://jordan.rave5.com/tmp/

模板我不知道該代碼是什麼問題,我認爲是與上述兩個類別。

可能的罪魁禍首:

  #background-overlay { 
       z-index: 100; 
       width: 100%; 
       height: 100%; 
       margin: 0; 
       padding: 0; 
       background-color: #273722; 
       background-image: url(images/main-bg.png); 
       background-repeat: repeat; 
       background-attachment: fixed; 
       opacity: 0.0; 
       top: 0; 
       bottom: 0; 
      } 

      #background-gradient { 
       position: fixed; 
       z-index: 200; 
       width: 100%; 
       height: 100%; 
       margin: 0; 
       padding: 0; 
       background-image: url(images/main-grad.png); 
       background-repeat: repeat-x; 
       background-position: top; 
       top: 0; 
       bottom: 0; 
       overflow: auto; 
      } 

HTML

<div id="background-overlay"> 
     <div id="background-gradient"> 

      <div id="header-image-grad"> 

        <div id="header"> 
         <div id="header-container"> 
          <div id="navigation-container"> 
           <div id="navigation"> 
            <span id="nav">Navigation Area...</span> 
           </div> 
          </div> 
         </div> 
        </div> 

       <div id="header-image-border"> 
        <img class="header-img" src="slides/fields.jpg" alt="Panoramic Fields" /> 
        <div class="image-grad"></div> 
       </div> 

      </div> 

      <div id="body"> 
       <div id="body-content"></div> 
       <div class="loading"><img src="images/loading.gif" alt="Loading Content" /></div> 
      </div> 

      <div id="footer"> 
       <br /> 
       <div id="footer-content"> 
        Footer Area... 
       </div> 
      </div> 

     </div> 
    </div> 

回答

6

中刪除margin-top:100%#footer-content id

+0

感謝的人......現在我得弄清楚如何獲取頁腳留在底部。 – WASasquatch 2013-04-25 09:51:02

+1

@WASasquatch現在用於粘頁腳http://ryanfait.com/resources/footer-stick-to-bottom-of-page/ ---------- http://ryanfait.com/sticky-頁腳/ – 2013-04-25 09:55:37

+0

我想我把它設置爲相對和頁腳到絕對底部的漸變。 – WASasquatch 2013-04-25 09:57:46

0

因爲你的BAC您background-image: kground梯度ID是具有2000像素的高度

0

頁腳都有其邊距設置爲100%