2012-08-06 33 views
0

Before-image添加另一個圖像後的額外間隙

這是在添加頁腳文本之前。頁腳圖像在頁面底部很好地放置。

After-image

這是我後添加頁腳文本。

我找不到在頁面底部導致神祕的額外空白的問題。忽略黑色邊框 - 我用它來檢查頁腳文本圖像的邊距。

CSS:

* { 
    margin: 0; 
    padding:0; 
} 



body { 
    background-image: url('images/BG-W1.png'); 
} 
#container{ 
    max-width:1000px; 
    margin: 0 auto; 
    position: relative; 
    padding: 0 auto; 
    height: 790px; 
    border: 2px solid blue; 

} 

#footerBg { 
    position: relative; 
    bottom:-63px; 
    left:-50px; 
} 

#footerBg img { 
    display: block; 
} 

#footertex { 
    position: relative; 
    top:-110px; 

    border:2px solid black; 

} 
footer { 
    height: 50px; 
} 

#footertex img { 
    display: block; 
} 

HTML:

<footer> 
      <figure id="footerBg"> 
       <img src="images/BG_F_S3.png" alt="Footer Background" width="" height="" /> 

      </figure> 

     <<figure id="footertex">  
        <img src="images/ft1.png" usemap="#green" border="0" /> 

        <map name="green"> 

        <area shape="rect" coords="513,56,625,106" href="http://www.google.com" /> 
        <area shape="rect" coords="725,58,874,108" href="http://www.google.com" /> 

        </map> 
     </figure> 

     </footer> 
+2

你可以發佈你的一些CSS和HTML嗎? – JSW189 2012-08-06 13:15:00

+0

我有點困惑,你能告訴我們你的html嗎? – Undefined 2012-08-06 13:15:40

+0

已發佈。哦,天哪,當時完全忘了發佈代碼。 – TheKraven 2012-08-06 13:23:55

回答

1

您可以發佈您的HTML & CSS代碼?想到一個快速解決方案將是div#footer { box-sizing: border-box; },但顯示你已經擁有的將有希望讓你更好的答案。

+0

'之前有一個額外的開放標籤。另外,我不明白你爲什麼對你的頁腳元素有這麼多的負面定位。本質上,你的''將位於其父元素'
'之外。這是故意的嗎? – carmat 2012-08-09 14:53:31

相關問題